User Tools

Site Tools


pi:temperature

Differences

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

Link to this comparison view

Next revision
Previous revision
pi:temperature [2017/11/24 17:21] – created slackpi:temperature [2019/11/07 17:58] (current) – external edit 127.0.0.1
Line 3: Line 3:
 ===== 18B20 (digital) ===== ===== 18B20 (digital) =====
  
-At the end of ''/boot/config.txt'':+Wiring: 
 +  * Waterproof: 
 +    * Red: 3.3V 
 +    * Yellow: 4.7 k pull-up (5.1k fine) and gpio pin nominated in ''/boot/config.txt'' 
 +    * Blackground 
 +  * Kit module: 
 +    * 1 (labelled ''-''): ground 
 +    * 2: 3.3V 
 +    * 3 (labelled ''S''): 4.7k pull-up and signal
  
-  dtoverlay=w1-gpio+Wire as many as you like in parallel.  There are limits to numbers and to wiring length, but they're not simple. 
 + 
 +At the end of ''/boot/config.txt'' (replace 21 with pin number): 
 + 
 +  dtoverlay=w1-gpio,gpiopin=21
  
 Save and reboot. Save and reboot.
Line 11: Line 23:
   ls -l /sys/bus/w1/devices   ls -l /sys/bus/w1/devices
  
-Grab its address (format ''28-00000xxxxxx'').  Read the temperature with+Grab its address (format ''28-xxxxxxxxxxx'').  Read the temperature with
  
-  cat /sys/bus/w1/devices/28-00[address]/w1_slave+  cat /sys/bus/w1/devices/28-[address]/w1_slave
  
 The numerical value after ''t='' is the temperature in thousandths of a degree C. The numerical value after ''t='' is the temperature in thousandths of a degree C.
pi/temperature.1511544075.txt.gz · Last modified: 2019/11/07 17:58 (external edit)