跳到主要內容

1 wire DS2431 setup on raspberry pi

precursor:

The January 2015 Raspbian release, with Pi 2 support, switches to a new kernel (3.18), and includes a configuration change to enable Device Tree support by default.  

use sudo raspi-config to enable I2C in Advanced Options > I2C.

Now we start:


Here we are using 1-wire eeprom DS2431 as example, with 2k2 resistor as pull up to 3v3 Vcc.

We chose GPIO25 of BCM, ( which is  wiringPi Pin6) as I/O pin of DS2431


referring to https://www.raspberrypi.org/forums/viewtopic.php?p=518859#p518859




step 1
sudo su -


In /boot/config.txt need to be add following line:

dtoverlay=w1-gpio,gpiopin=25

>>> reboot

step 2
before modprobe:


sudo su -
modprobe w1-gpio
ls /sys/bus/w1/devices
 you can see eeprom is NOT yet found under 2d-00001ac198e4 (2d is family code of DS2431)

modprobe w1_ds2431
ls -al /sys/bus/w1/devices



now you see eeprom. Bingo!

step 3

To dump the eeprom content, while still at /sys/bus/w1/devices/2d-00001ac198e4 directory:

su -c 'echo "CHIP EEPROM TEST"  > eeprom'

step 4. to display versions of w1gpio module:

modinfo w1gpio


in etc/modules, add

w1_ds2431

this will load the w1_ds2431 every time in boot up


step 5

install OWFS




references:
nextthing
device tree

1-wire not working...see reply from philE
 packtpub on install owfs ( needs some minor update on instructions...)

留言