From c7900baf1d02c59afeba0918a2416c8a48c13cd2 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Mon, 25 Jan 2016 22:51:45 +0100 Subject: [PATCH] send strings via i2c --- i2c/string.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 i2c/string.py diff --git a/i2c/string.py b/i2c/string.py new file mode 100755 index 0000000..5ba3b19 --- /dev/null +++ b/i2c/string.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python + +import sys +import smbus + +bus = smbus.SMBus(1) +address = 0x23 + +for c in sys.argv[1]: + bus.write_byte(address, ord(c)) +