Hello !
I am sorry to disturb you again and again, I hope you wont be too sick of me ^^'.
I am still exploring The possibility of the Arduio Yun Mini and guess what ? I feel like the board doesn't want to. Do you think it feels raped ?
Anyway, I way pasting a pyhton script from this post but when I run the script I gto the following error :
leds.py
#!/user/bin/python
import sys
sys.path.insert(0, 'user/lib/python.7/bridge')
from time import sleep
from bridgeclient import BridgeClient as bridgeclient
value = bridgeclient()
for idx in randg(0, 100):
value.put('D12', '0')
value.put('D13', '1')
sleep(0.1)
value.put('D12', '1')
value.put('D13', '0')
terminal
root@Picolo:/bin/pyhon# python leds.py
Traceback (most recent call last):
File "leds.py", line 8, in <module>
from bridgeclient impor BridgeClient as bridgeclient
ImportError: No module named bridgeclient
Am I the only one that need to fix everything on openwrt ? (yes Ihave updated it)
I haven't fired up a Yun to verify exactly where the bridge client package may live, but I see that the import statement that is giving you trouble is different from the code you reference:
Your code: user/lib/python.7/bridge
Sample code: /usr/lib/python2.7/bridge
There are three differences, all of which are important. The import statement is telling Python where to find the module, and it needs to be exactly right - kind of close doesn't work.
I did not compare the rest of the code to see if there were any other errors. There are parts you can change to fit your needs, and parts you can't - the import path is a part you can't just randomly change.
Zaszigre:
Am I the only one that need to fix everything on openwrt ? (yes Ihave updated it)
Please don't take this the wrong way, but I don't think that's a fair statement. While the Arduino version of OpenWRT isn't perfect, in this case, the problem is that you made an error copying over the path to the bridge module. After fixing that, if there are still problems with the code you are trying to use, the problem is probably with the author of that Instructable, not with OpenWRT. Be aware that anyone can post to Instructable: they don't necessarily need to know what they're talking about, and if it includes code, that code doesn't necessarily work and isn't necessarily written well. The author might just be repeating something they saw somewhere else, and might know less than you!