Hi
I have problems makeing libmraa working on Linkit Smart 7688.
The installation worked without problems and i tested with a python script. See
details below:
what i did:
- Compiled a openWRT 18.6
- opkg update
- opkg install libmraa
- opkg install python3-light
- opkg install libmraa-python3
- copied this skript to /root:
import mraa
import time
try:
print (mraa.getVersion())
except:
print("no mraa available")
# Refer to the pin-out digram for the GPIO number to silk print mapping
# in this example the number 44 maps to Wi-Fi LED.
pin = mraa.Gpio(2)
pin.dir(mraa.DIR_OUT)
while True:
pin.write(1)
time.sleep(1)
pin.write(0)
time.sleep(1)
- and executed:
root@OpenWrt:~# python3 mraa-test-simple.py
v2.0.0
Traceback (most recent call last):
File "mraa-test-simple.py", line 11, in <module>
pin = mraa.Gpio(2)
File "/usr/lib/python3.7/site-packages/mraa.py", line 391, in __init__
_mraa.Gpio_swiginit(self, _mraa.new_Gpio(pin, owner, raw))
ValueError: Invalid GPIO pin specified
- checked with a LED on pin2 like this if GPIO2 works:
root@OpenWrt:~# cd /sys/class/gpio/
root@OpenWrt:/sys/class/gpio# ls
export gpiochip0 gpiochip32 gpiochip64 unexport
root@OpenWrt:/sys/class/gpio# echo 2 > export
root@OpenWrt:/sys/class/gpio# ls
export gpio2 gpiochip0 gpiochip32 gpiochip64 unexport
root@OpenWrt:/sys/class/gpio# cd gpio2
root@OpenWrt:/sys/devices/platform/10000000.palmbus/10000600.gpio/gpiochip0/gpio/gpio2#
echo "out" > direction
root@OpenWrt:/sys/devices/platform/10000000.palmbus/10000600.gpio/gpiochip0/gpio/gpio2#
cat value
0
root@OpenWrt:/sys/devices/platform/10000000.palmbus/10000600.gpio/gpiochip0/gpio/gpio2#
echo 1 > value
- redone previous step with no changes in error output.
what am i missing?
Thanks for comments, Ivan Hörler_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel