arishy wrote: ↑Sat May 12, 2018 3:27 pmI have the latest RPi image:
2018-03-13-raspbian-stretch with update and upgrade before I started this saga.
You know I am ready to create another RPi ( 2 in this case ) with a fresh image [ 2018-03-13-raspbian-stretch]
and follow your steps ...What do you think ??? is it worth the trouble ?? I am ready
Code: Select all
import mraa import time # Refer to the pin-out diagram for the GPIO number #button pin buttonpin = mraa.Gpio(43) buttonpin.dir(mraa.DIR_IN) relaypin = mraa.Gpio(3) relaypin.dir(mraa.DIR_IN) relaypin_out = mraa.Gpio(3) relaypin_out.dir(mraa.DIR_OUT) while True: if buttonpin.read() == 0: #button was pressed time.sleep(0.5) print "button pressed" print "relay:", relaypin.read() if relaypin.read() == 0: relaypin_out.write(1) else: relaypin_out.write(0)
I did that ....same error message !!!!Currently our install logic puts Python bindings into standard paths, which do not work on Debian due to their policy.
We are working on a permanent solution, in the meantime please use this command after make install to link installed modules where Debian's Python expects them:
sudo ln -s <your install prefix, e.g. /usr>/lib/python2.7/site-packages/* /usr/lib/python2.7/dist-packages
Same approach works for Python 3, you'll just need to adjust the version number in the path accordingly.