|
Re: NEED HELP WITH SERVOS!!
You need to put some math in between your joystick button outputs, and the Servo Set Angle block.
That SetAngle SubVI is expecting a number between 0 and 180 degrees(typically), and not the simple true/false (boolean) that you're trying to connect in your 3rd image.
How do you want the button(s) to steer it? If you are controlling both the PAN and TILT motors, then you'd need at least 4 buttons to steer it left/right or up/down. Here's one idea, read the angles from the servos, then use some true/false statements from the buttons to either add or subtract some constant value (like 10 degrees) to the read angles, then set that new angle value into the motors. If none of the 4 buttons are pressed, simply pass the original value (Get Angle) to the new value (Set Angle).
There are many many options to do this ... this is just one ... tell us more about your intent ...
|