Wiring Forum
Bugs >> Website,  Reference,  Examples Bugs >> SHT15 example

Message started by ajkeller on 09/29/10 at 16:42:39

Title: SHT15 example
Post by ajkeller on 09/29/10 at 16:42:39
The SHT15 example using the SparkFun breakout does not work with Wiring 0027, but does work with Wiring 0026. I suspect this has something to do with modifications to ShiftOut, although I cannot say for sure (just going by the version log).

Title: Re: SHT15 example
Post by barragan on 09/29/10 at 18:50:50
Thanks for the report. Could you please paste the function code below into your sketch (on 0027) and try again? Please let me know.

void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint16_t value) {
  for (uint8_t i = 0; i < 8; ++i) {
    if (bitOrder == LSBFIRST)
      digitalWrite(dataPin, value & (1 << i));
      digitalWrite(dataPin, value & (1 << ((7) - i)));
    digitalWrite(clockPin, HIGH);
    digitalWrite(clockPin, LOW);

Wiring Forum » Powered by YaBB 2.5 AE!
YaBB Forum Software © 2000-2010. All Rights Reserved.