Temperature sensor DS18b20 (dallas 1-wire) easy configuration


sooperior
 Share

0

Recommended Posts

Hi All,

Just wanted to share a good story using armbian. I have used in the past 1-wire probes for temperature, and the process included decompiling, editing and recompiling dtb for my Banana Pi M1, which was not easy at all. Every firmware update deleted by changes and had to redo de recompilation.

 

With latest kernels and armbian version, the process is now extremely easy, just edit:

/boot/armbianEnv.txt

 

Adding this lines:

overlays=w1-gpio

param_w1_pin=PI3             # desired pin(7th pin (GCLK) or number 4 on first column where number 1 is +3V)

param_w1_pin_int_pullup=1     # internal pullup-resistor: 1=on, 0=off

 

I just struggled a little bit to find the GPIO code (decompiled dtb and checked possible candidates).

 

Information about temperature is here:

cat /sys/bus/w1/devices/XX-YYYYYYY[this is your probe serial, if you have more they will be in /sys/bus/w1/devices/] /w1_slave

 

You have plenty of information here, but don't need to do all they explain, just my edition has been enough:

http://linux-sunxi.org/1-Wire

 

 

 

Link to post
Share on other sites

Donate and support the project!

5 hours ago, sooperior said:

just struggled a little bit to find the GPIO code (decompiled dtb and checked possible candidates).

 

5 hours ago, sooperior said:

# desired pin(7th pin (GCLK) or number 4 on first column where number 1 is +3V)

Effectively, you seems confused about GPIO pin name.

It should be simple as "param_w1_pin=PD14" for example.

Link to post
Share on other sites

Guest
This topic is now closed to further replies.
 Share

0