How to drive eeprome at24c64 via I2c and device tree - Raspberry Pi Forums
who can teach me step step
.thanks!

sudo raspi-config
select advanced options / enable i2c
sudo apt-get install python-smbus
sudo nano /etc/modules addand save [ctrl]+[x]
sudo reboot active.
should able write thisand read with
select advanced options / enable i2c
sudo apt-get install python-smbus
sudo nano /etc/modules add
code: select all
i2c-dev
sudo reboot active.
should able write this
code: select all
import smbus bus = smbus.smbus(1) addr=0x50 byte=0x14 value=0x42 bus.write_byte_data(addr,byte,value)
code: select all
import smbus bus = smbus.smbus(1) addr=0x50 byte=0x14 value = bus.read_byte_data(addr,register) print value
raspberrypi
Comments
Post a Comment