Quote:
|
Originally Posted by stephenthe1
[T]he only thing is that our encoder's "b" phase isn't wired yet. [W]ill this mess it up?
|
Yeah, I would guess not having the B line connected will keep your code from operating as you expect. (Since you don't explain how you expect it to operate, I will make some assumptions.)
Not having the B line connected will keep the software from knowing which direction the encoder is turning. If you're lucky(?), the encoder interrupt handler will DECREMENT the counter on each interrupt, so that the arm control will appear to operate correctly for a while (with the exception that the arm won't stop where you think it should be when the encoder counter = 12.) After the encoder counter overflows, the arm will stop responding, because the counter will now be greater than 12.
If, on the other hand, the interrupt handler INCREMENTS the counter instead of decrementing it, I expect that the arm will stop responding after just a slight twitch, no mater which direction you move the joystick. (I say just a slight twitch, because 12 seems like such a small number when you're talking about encoders. I could be wrong, and your encoder might actually be of low enough resolution that a count of 12 will actually measure a reasonable arm rotation.)