This is an old revision of the document!


1wire

1wire.jpg

The 1wire bus supports various low speed digital devices and is supported in Linux on the Raspberry Pi.

Raspberry Pi

Edit boot/config.txt to assign gpio4 for 1wire.

dtoverlay=w1-gpio,gpiopin=4

Reboot and after load driver.

modprobe w1_gpio
Pin Name Function
1 3V3 POWER
6 GND GROUND
7 GPIO4 DATA

DS18B20 Thermometer

+-------+
| 1 2 3 |
+-------+
  | | |
  | | |
  
1 GROUND
2 DATA
3 POWER
modprobe w1_therm
cat /sys/bus/w1/devices/28-041460bdd6ff/w1_slave 
8f 01 55 00 7f ff 0c 10 a0 : crc=a0 YES
8f 01 55 00 7f ff 0c 10 a0 t=24937

DS2431 EEPROM

+-------+
| 1 2 3 |
+-------+
  | | |
  | | |
  
1 GROUND
2 DATA
3 NC
modprobe w1_ds2431
echo "hello world" > /sys/bus/w1/devices/2d-00000de5d608/eeprom
cat /sys/bus/w1/devices/2d-00000de5d608/eeprom
hello world

Resources

This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information