![]() |
Controlling the camera with a joystick
Hello I was wondering how (if possible) I would be able to allow a joystick to be used to control the camera on the robot.
|
Re: Controlling the camera with a joystick
Assuming you mean that you want to move the servos on the camera mount using a joystick, yes it is indeed possible.
We've been playing around with such control for about a week. Here is a one method in LabVIEW. Essentially you can tell the servo "goal" position to increment by 1 (or another value) every time the main loop loops if a certain condition is met (i.e. a joystick in a particular position). The servos will constantly goal seek on this new position. We accomplished this by storing the "goal" position in a shift register and incrementing/decrementing/not changing this value depending on a case statement triggered by a joystick. Again this in LabVIEW but the same principle should apply in Java and C. Hope this helps, Student Programmer, Team #2614. |
Re: Controlling the camera with a joystick
how about setting the angle of the servos proportionate to the axes of the joystick? works great!
|
Re: Controlling the camera with a joystick
Quote:
|
Re: Controlling the camera with a joystick
Quote:
|
Re: Controlling the camera with a joystick
No while loops inside while loops.
Use a shift register and put the code in the main loop. |
Re: Controlling the camera with a joystick
Quote:
(If you're changing the value by extremely small amounts, you might need to watch out for rounding errors in the conversion between servo position and PWM value.) |
Re: Controlling the camera with a joystick
Quote:
|
Re: Controlling the camera with a joystick
Quote:
|
Re: Controlling the camera with a joystick
Got it, thanks.
|
| All times are GMT -5. The time now is 02:06. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi