Trouble with duppa i2c rotary encoder-Board on Pi Pico W #10389
Unanswered
JohnnyTank
asked this question in
RP2040 / Pico
Replies: 1 comment
-
You said that scan retrurns the address of the encoder. Is the same address used by the driver software? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to get a duppa I2C -rotary encoder board V2.1 running.
On a Pico W on a pimoroni-board explorer.
the i2c-scan gives an adress.
After two days of searching the Internet I have still no clue of what is going wrong.
Help is very welcome.
the start_encoder method is working too, but if i am trying to read data from the encoder i am getting:
Traceback (most recent call last):
File "", line 84, in
File "", line 52, in main
File "i2cEncoderLibV2.py", line 171, in updateStatus
File "i2cEncoderLibV2.py", line 615, in readEncoder8
OSError: [Errno 5] EIO
I am using this code:
I tried to fit the Encoder Library to micropython:
The Error occures in this part of the code:
# read the encoder 1 byte # def readEncoder8(self, add): print('reading from: %d' %(self.i2cadd)) print('Subadress: %d' %(add)) data = self.i2cbus.readfrom_mem(self.i2cadd, add, 1) print(data) #value = struct.unpack(">b", bytearray(data)) #return value[0] return data
Beta Was this translation helpful? Give feedback.
All reactions