If you run out of I/O in your Arduino, you can use this chip. It is accesses through I2C, and it costs less than two bucks.
It provides and additional 8 I/O pins.
But what is interesting is that you can use it to control one or more rotary encoders and only utilize one interrupt line in the Arduino (remember that the current Arduino only has 2 external -easy to use- interrupt lines). I learned a lot from this article. However, there is an easier way to detect the rotation direction of the encoder, and that is the "XOR" shortcut as described in this article.
No comments:
Post a Comment