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 add

code: select all

i2c-dev
and save [ctrl]+[x]

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)
and read with

code: select all

import smbus bus = smbus.smbus(1)    addr=0x50 byte=0x14 value = bus.read_byte_data(addr,register) print value


raspberrypi



Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support