Hello,
I'm trying to use I2C with python on my TL-MR3020. My problem is, it seems like there are missing packages in trunk, compare yourself:
in http://downloads.openwrt.org/backfire/1 … /packages/ you can find:
i2c-tools
python-smbus
but you can't find them in trunk: http://downloads.openwrt.org/snapshots/ … /packages/
I installed i2c-tools from backfire and it works, but it seems like this method doesn't work for python-smbus:
root@OpenWrt:~# opkg install http://downloads.openwrt.org/backfire/10.03.1/ar71xx/packages/python-smbus_3.0.3-1_ar71xx.ipk
Downloading http://downloads.openwrt.org/backfire/10.03.1/ar71xx/packages/python-smbus_3.0.3-1_ar71xx.ipk.
Installing python-smbus (3.0.3-1) to root...
Configuring python-smbus.
root@OpenWrt:~# cat i2c-test.py
#!/usr/bin/env python
import smbus
import time
bus = smbus.SMBus(0)
for a in range(0,256):
bus.write_byte(0x20,a)
time.sleep(0.1)
root@OpenWrt:~# ./i2c-test.py
Traceback (most recent call last):
File "./i2c-test.py", line 3, in <module>
import smbus
ImportError: No module named smbus
I'm not completely sure about my sourcecode, but i think with a proper installed python-smbus this should work...?
Would be glad if someone could help me here
Greetings
schuhumi
PS: I don't want to use an older release because of ZRam