Cameron Prince
Cameron Prince
Ugh, I see that I neglected to provide a way to pass the I2C interrupt pin to display. This interrupt fires with any change of the encoder and is needed....
Here's a working script which shows how to interact with the I2CEncodes using the [i2cEncoderLibV2](https://github.com/cameronprince/i2cEncoderLibV2) library. ``` import time import struct from machine import Pin, I2C import i2cEncoderLibV2 # Setup...
Thanks for the reply. For a little background on the I2CEncoder, it was a Kickstarter campaign here: https://www.kickstarter.com/projects/1351830006/i2c-encoder-v2 The library and datasheet are here: https://github.com/Fattoresaimon/I2CEncoderV2.1 The library from the author...
Oh, I forgot to mention a nice project with a lot of good info on the I2CEncoders is here: https://www.vinthewrench.com/p/rings-and-knobs
I understand... The benefits are; reduction in GPIO usage, wiring, consolidation of code and they're pretty cool visual status indicators. The good thing is, if you do add support for...
This solution is a bit of a hack, but I've discovered if I check the pin status in the interrupt callback, I can determine whether or not to call updateStatus()...
This still seems like a hack, but I've discovered that if I reinit the interrupt pin inside the Encoder_INT function, the continuous calls to the function cease. I'm now getting...
Thanks for the reply... In testing this work around mentioned above, eventually, after some number of interactions with the i2cencoder, the interrupt stops firing. So it seems I have three...
@Fattoresaimon, A follow-up here... I've been pretty successful using four I2CEncoders with my project. I did settle with a separate GPIO pin for each encoder's interrupt. I was never able...
I was able to resolve this. The key was to not try and do the polling to see which i2cencoder triggered the interrupt in the interrupt callback itself. The interrupt...