P1 Quadrature Encoder Demo
ZachS
Posts: 28
in Propeller 1
Hi everyone,
I'm working on a program, using the P1 Propeller Project Board USB, that will be using a KY-040 Rotary Encoder to allow a user to turn the encoder's dial to select an 8-bit binary number that will then be sent to a SPI object that will output it to LED's.
Does anyone have a P1 Quadrature Encoder Demo that I could look at to get a better idea of how the rotary encoder works, how I need to connect the bits, and how I can send the user's input to the SPI?
Thank you for the help!
Zach
Comments
https://forums.parallax.com/discussion/143397/propbasic-routine-for-quadrature-encoder-reading-fast-and-worked-first-time#latest
I replied to the original post but it appears to have been deleted; the above explains the logic....I use it for closed-loop motor control.
I removed the duplicate in Basic Stamp forum but forgot to paste the reply here. Sorry.
We PropBasic programmers are accustomed to be regarded as the great unwashed, regardless of the fact that it is the ultimate HLL for the Prop 1
Just kidding Jim
There's a bunch of different quadrature encoder examples floating around the forum. Post #2 of this thread has a couple examples I shared.
Edit: The Propeller Tool includes a quadrature encoder object. I shared a couple demo programs of this object here.
Thank you Duane and Mickster. Those demo examples were very helpful.
Zach