I have a Pi 3 controlling GPIO pins and also IO PI expander.
It's been working fine but now there are problems after I've been tinkering with other code. I've narrowed it down to the problem being caused by the setting of the GPIO pins.
For example, if I run the following after the Pi boots (and without running any other code)...
Code: Select all
echo "2" > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio2/direction
echo "3" > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio3/direction
Code: Select all
Failed to import IOPi from python system path
Importing from parent folder instead
Traceback (most recent call last):
File "ht1.py", line 111, in <module>
main()
File "ht1.py", line 44, in main
iobus2 = IOPi(0x21)
File "../IOPi.py", line 117, in __init__
self.__ioaddress, self.IOCON, self.__ioconfig)
IOError: [Errno 5] Input/output error
Thanks.