send strings via i2c
This commit is contained in:
parent
ae67e347e9
commit
c7900baf1d
1 changed files with 11 additions and 0 deletions
11
i2c/string.py
Executable file
11
i2c/string.py
Executable file
|
@ -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))
|
||||||
|
|
Loading…
Reference in a new issue