This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
|
oak:tutorials:onewiretemp [2016/03/22 09:14] exeng [Connecting the DS18B20 device to the Oak] |
oak:tutorials:onewiretemp [2016/03/26 08:49] exeng [THIS TUTORIAL HAS NOT YET BEEN REVIEWED, PLEASE DO NOT USE UNTIL IT HAS] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== "THIS TUTORIAL HAS NOT YET BEEN REVIEWED, PLEASE DO NOT USE UNTIL IT HAS" ====== | + | |
| ====== Oak: Temperature Sensing and the 1-Wire Bus Lesson ====== | ====== Oak: Temperature Sensing and the 1-Wire Bus Lesson ====== | ||
| Line 121: | Line 121: | ||
| ==== Initialization and Setup() ==== | ==== Initialization and Setup() ==== | ||
| - | DS18B20_Pin defines the pin to use for the 1-Wire bus (DQ line). In this example it is set to pin 2 but can be changed to ay pin that can tolerate being pulled up at power on. | + | DS18B20_Pin defines the pin to use for the 1-Wire bus (DQ line). In this example it is set to pin 2 but can be changed to any pin that can tolerate being pulled up at power on. |
| The OakLEDpin, pin 1 is used to provide a visual output when temperature is being read. | The OakLEDpin, pin 1 is used to provide a visual output when temperature is being read. | ||
| - | sleepTimeS specifies the delay in seconds between readings. We don't actually sleep but rather simply delay a specified amount of time in seconds before that next temperature update. It's important to keep this relatively course as we don't wont to flood Particle.io with constant updates to the log. For slow changing inputs, 30 seconds to 1 minute is about right but you can easily change this to suit your own needs. | + | sleepTimeS specifies the delay in seconds between readings. We don't actually sleep but rather simply delay a specified amount of time in seconds before that next temperature update. It's important to keep this relatively course as we don't want to flood Particle.io with constant updates to the log. For slow changing inputs, 30 seconds to 1 minute is about right but you can easily change this to suit your own needs. |
| <code> | <code> | ||