You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i bought version 2.1 and i am trying to run it on a raspberry 4 later in combination with the led ring (both connected to the RPi).
I2C is set to 100kHz in the config.txt
Now it occurs after some random turns of the encoder that the, i think, mc of the encoder crashes because i2cdetect -y 1 still sees my LED ring, but the encoder is gone after the error:
Encoder min!
sum: 1289
Traceback (most recent call last):
File "/home/pi/i2cring/./drehencoder.py", line 58, in Encoder_INT
encoder.updateStatus()
File "/home/pi/i2cring/i2cEncoderLibV2.py", line 192, in updateStatus
self.eventCaller (self.onChange)
File "/home/pi/i2cring/i2cEncoderLibV2.py", line 167, in eventCaller
event()
File "/home/pi/i2cring/./drehencoder.py", line 19, in EncoderChange
temp = encoder.readCounter32()
File "/home/pi/i2cring/i2cEncoderLibV2.py", line 298, in readCounter32
return (self.readEncoder32(REG_CVALB4))
File "/home/pi/i2cring/i2cEncoderLibV2.py", line 624, in readEncoder32
data = self.i2cbus.read_i2c_block_data(self.i2cadd, add, 4)
File "/home/pi/.local/lib/python3.9/site-packages/smbus2/smbus2.py", line 617, in read_i2c_block_data
ioctl(self.fd, I2C_SMBUS, msg)
OSError: [Errno 121] Remote I/O error
Traceback (most recent call last):
File "/home/pi/i2cring/./drehencoder.py", line 58, in Encoder_INT
encoder.updateStatus()
File "/home/pi/i2cring/i2cEncoderLibV2.py", line 171, in updateStatus
self.stat = self.readEncoder8(REG_ESTATUS)
File "/home/pi/i2cring/i2cEncoderLibV2.py", line 610, in readEncoder8
data[0] = self.i2cbus.read_byte_data(self.i2cadd, add)
File "/home/pi/.local/lib/python3.9/site-packages/smbus2/smbus2.py", line 433, in read_byte_data
ioctl(self.fd, I2C_SMBUS, msg)
OSError: [Errno 121] Remote I/O error
^CTraceback (most recent call last):
File "/home/pi/i2cring/./drehencoder.py", line 114, in <module>
pass
KeyboardInterrupt
After this error i have to disconnect the Encoder/LED Ring. It doesnt help to just rerun the script.
I tried it multiple times to see if there is a kinf of pattern. But it crashes after 700.... 3000 clicks. Slow or fast does also seem to do the same.
Any ideas?
also another problem is the 100 percent usage when using the example. Probably due to this:
while True:
# if GPIO.input(INT_pin) == False: #
# Encoder_INT() #
time.sleep(0.00001) <- added by me
pass
I added some sleep (so about 20 pervent load by python), also played aroung with the value.
The problem, that the mc isnt responding anymore, remains. Is the buffer of the PIC mc too small? It seems that it crash mor often when rotating fast. But sometimes it also crashes when doing slot rotation
Hi,
i bought version 2.1 and i am trying to run it on a raspberry 4 later in combination with the led ring (both connected to the RPi).
I2C is set to 100kHz in the config.txt
Now it occurs after some random turns of the encoder that the, i think, mc of the encoder crashes because
i2cdetect -y 1
still sees my LED ring, but the encoder is gone after the error:After this error i have to disconnect the Encoder/LED Ring. It doesnt help to just rerun the script.
I tried it multiple times to see if there is a kinf of pattern. But it crashes after 700.... 3000 clicks. Slow or fast does also seem to do the same.
Any ideas?
The text was updated successfully, but these errors were encountered: