Skip to content

Commit

Permalink
Move to OneWire to different pin and make it a #define variable. Send…
Browse files Browse the repository at this point in the history
… temps in Fahrenheit for greater wife acceptance.
  • Loading branch information
dglinder committed Oct 9, 2017
1 parent 75ea078 commit 8dcb3b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions SparkThing-Monitor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
// * Ground == Blue
// * 3V == Blue/White
// * Pin 2 == Green
OneWire ds(2); // on pin 2 (a 4.7K resistor is necessary)
#define DATAPIN 14
OneWire ds(DATAPIN); // a 4.7K resistor is necessary

// Wiring to the Dallas Semiconductor DS18B20 sensors:
// * Pin 1 == Ground == Blue +-------+
Expand Down Expand Up @@ -123,7 +124,8 @@ void loop(void) {
Serial.println("################################################");
lastMillis = millis();
for ( i = 0; i < MAXPROBES; i++) {
Cayenne.celsiusWrite(i, tempsC[i]);
//Cayenne.celsiusWrite(i, tempsC[i]);
Cayenne.fahrenheitWrite(i, tempsF[i]);
Serial.print(" Probe "); Serial.print(i);
Serial.print(" Value "); Serial.print(tempsC[i]); Serial.print("C");
Serial.print(" or "); Serial.print(tempsF[i]); Serial.print("F");
Expand Down

0 comments on commit 8dcb3b3

Please sign in to comment.