diff --git a/i2c/echo.py b/i2c/echo.py new file mode 100755 index 0000000..737cd67 --- /dev/null +++ b/i2c/echo.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +import smbus + +bus = smbus.SMBus(1) +address = 0x23 + +def send(data): + print 'Send / receive: ' + str(data) + ' / ' + str(bus.read_byte_data(address, data)) + + +for d in range(1, 5): + send(d)