User Tools

Site Tools


digispark:tutorials:temp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
digispark:tutorials:temp [2016/03/22 22:03]
exeng [Publishing Temperature Data]
digispark:tutorials:temp [2016/03/22 22:09]
exeng [Sleep Mode configuration:]
Line 228: Line 228:
   - Yellow wire - pin 10 (WAKE) to RESET (RST)   - Yellow wire - pin 10 (WAKE) to RESET (RST)
   - White wire – pin 2 to DS18B20 DQ (note: 4.7K pull-up resister)   - White wire – pin 2 to DS18B20 DQ (note: 4.7K pull-up resister)
 +  - DS18B20 leads from left to right: (1) GND, (2) DQ, (3) Vdd
  
-[[oak-temp-sensing-1-wire-bus-2.jpg|{{oak-temp-sensing-1-wire-bus-2.jpg}}]]+{{:​digispark:​tutorials:​oak-temp-sensing-1-wire-bus-2.jpg?​direct&​200|}}
  
 In Sleep Mode (after reading and publishing temperature data) the Oak enters deep sleep and delays for a user specified number of seconds. When sleep time has expired, a RESET is triggered via pin 10 (WAKE). Following a RESET, the sketch starts from the beginning and never enters loop(). In Sleep Mode (after reading and publishing temperature data) the Oak enters deep sleep and delays for a user specified number of seconds. When sleep time has expired, a RESET is triggered via pin 10 (WAKE). Following a RESET, the sketch starts from the beginning and never enters loop().
Line 270: Line 271:
   - White wire – pin 2 to DS18B20 DQ (note: 4.7K pull-up resister)   - White wire – pin 2 to DS18B20 DQ (note: 4.7K pull-up resister)
   - Blue wire – pin 5 to GND (ground)   - Blue wire – pin 5 to GND (ground)
 +  - DS18B20 leads from left to right: (1) GND, (2) DQ, (3) Vdd
 +
 +{{:​digispark:​tutorials:​oak-tem-sensing-1-wire-bus-3.jpg?​direct&​200|}}
  
-[[oak-temp-sensing-1-wire-bus-3.jpg|{{oak-temp-sensing-1-wire-bus-3.jpg}}]] 
  
 Note the addition of the Blue wire connecting pin 5 to ground. In non-sleep mode the Oak enters setup() and reads pin 5 to determine the desired mode. Since pin 5 is pulled to ground (LOW) the sketch will enter loop() where it continually requests temperature data from the DS18B20 and publishes that date to the particle.io Dashboard log. Data is requested at intervals set by “sleepTimeS” which specifies the number of seconds to delay between readings. ​ Note the addition of the Blue wire connecting pin 5 to ground. In non-sleep mode the Oak enters setup() and reads pin 5 to determine the desired mode. Since pin 5 is pulled to ground (LOW) the sketch will enter loop() where it continually requests temperature data from the DS18B20 and publishes that date to the particle.io Dashboard log. Data is requested at intervals set by “sleepTimeS” which specifies the number of seconds to delay between readings. ​
digispark/tutorials/temp.txt · Last modified: 2016/06/09 12:03 (external edit)