Newbie to programming here, I wanted to ask some questions.
November 18, 2011
I hope I'm posting in the right place, I assume beginners would be the place for me.
There are a couple things I would like to know if are possible.
I would like to manipulate a ring with a motor. But I would like the ring to move to a specific position dictated by a joystick. In short, the marked forward position of the ring would be pointing the same direction as the joystick is pointing.
The joystick could be rotated in circles and the ring would follow the direction. I could read the position of the ring with a rotary encoder.
I had an idea how to lay out a program but have no idea how to implement this inside PicAxe for example.
First the program reads the direction of the joystick. By using some sort of information from the two pots.
Second, the program would read where the ring is located currently, from the rotary encoder.
After that, the program would ask where it needs to be, and which direction is the shortest to get there,
The motor would then move the ring until the values are the same.
It would do this multiple times a second, possibly with some constraints to minimize jittering.
At least I hope…
Someone set me straight, or let me elaborate if my ramblings are too ignorant/vague.