|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Servo Help
We need a servo to move in one direction when button "A" or "B" is pressed and held but only move a certain distance. Then when you release button "A" or "B" the servo will move back the same distance and stop. How do we do this?
|
|
#2
|
|||
|
|||
|
Re: Servo Help
Quote:
https://scontent-ord.xx.fbcdn.net/hphotos-xpf1/v/t1.0-9/11026250_10200285123408733_1602389002403779689_n.j pg?oh=5e3563c457b205e5364e54ce19b28a98&oe=5548BC9A |
|
#3
|
||||
|
||||
|
Re: Servo Help
You might be able to do this with a sequence structure. While button A is pressed, first move servo for X seconds, create a while loop in a new frame, re-acquire the button value, set the servo to 0, then set the loop to continue while the button is pressed.
|
|
#4
|
|||
|
|||
|
Re: Servo Help
I think this code does what you want it to. I think "itwasntme455" code might work, but I'm not sure because I can't see inside of the other cases.
servoThreePos.vi: will simply check which position you're trying to go to, and then set position based on that. If you want, you can just replace "SetPosition" with "SetRotation" and replace the values for the positions. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|