write_pin error
The Expander Pi is an Analogue, Digital and RTC development Interface for the Raspberry Pi
10/08/2020
Posted by:
oblenga
io.write_pin(1,1)
File "/usr/local/lib/python3.7/dist-packages/ExpanderPi/ExpanderPi.py", line 702, in write_pin
self.__set_pin(pin, value, self.GPIOA, self.GPIOB)
File "/usr/local/lib/python3.7/dist-packages/ExpanderPi/ExpanderPi.py", line 440, in __set_pin
newval = self.__updatebyte(curval, pin, value)
AttributeError: 'IO' object has no attribute '_IO__updatebyte'
This error only occurs with this sentence: "write_pin", not with "read_pin" or "write_port" for example.
I think the Library instalation is correct because there is not error in "import ExpanderPi" and "set_port_direction"
Someone knows what the solution is?
Thanks
This is the code...
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, time, sys, glob
import ExpanderPi
io = ExpanderPi.IO()
io.set_port_direction(0, 0x00)
io.set_port_direction(1, 0x00)
io.set_port_pullups(0, 1)
io.set_port_pullups(1, 1)
print("Hello")
io.write_pin(0,1)
time.sleep(3)
io.write_pin(0,0)
10/08/2020
Posted by:
andrew
Sorry, there was a bug with the Expander Pi python library. Please can you download the updated version from our GitHub repository and see if that fixes your problem?
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.