0
sooperior

Temperature sensor DS18b20 (dallas 1-wire) easy configuration

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

 

 

 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
0