|
Re: Shooter Lifting Code
Oops, I meant to attach this diagram to the last post to better illustrate how the sensors are laid out. With this layout there are only 5 possible angles to shoot from. If none of the sensors are being touched, the motor should be turning to angle the shooter at the right angle for the currently processed distance, and then stop once it touches that sensor.
I'm curious to know how you would use a potentiometer to read the position of the motor. I was assuming that we would have to use an encoder to do so, and that we would not have enough time now to configure it for the motor. I'll do some research on it, but if you know a way to make the potentiometer work for this task in a simpler way than the touch sensor setup, we'd be glad if you shared. I see that there are difficulties in programming the current approach, and with us, even simpler things tend to fail at the worst of times. I would rather not go through with a complicated program that I'm not completely sure will work without fault.
|