跳到主要內容

發表文章

目前顯示的是有「w1」標籤的文章

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...