Hi there,
I’ve just been looking at the Github repo (https://github.com/sparkfun/Qwiic_Dual_Encoder_Reader) for the Qwiic Dual Encoder Reader to get a better understanding what’s going on “under the hood”. First of all, let me just take a sec to thank the author Pete Lewis, and anyone else involved, for your excellent work here!
I can see that there are two sketches in the firmware folder of the repo - Qwiic_Dual_Encoder_Reader.ino and interrupts.ino. My current understanding from reading each sketch is that interrupts.ino handles the actual encoder logic - i.e. increments counters based on the signals coming from the encoders. Qwiic_Dual_Encoder_Reader.ino on the other hand appears to handle all the I2C communication stuff, including the encoder interrupts. Is that, broadly speaking correct?
If so, what I don’t understand is how these two are linked. Surely the ATtiny84 can’t be running both sketches simultaneously? And, as far as I can tell neither script imports the other. I know the answer to this is probably obvious, but if someone could enlighten me as to what’s going on that would be great!
Thanks,
Greg