Pages: [1]   Go Down
Author Topic: Controlling servos in real time  (Read 304 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all im trying to add a direct real time option to controlling servo movement on my mechanical claw project. right now im using string code and another program using case statements to control the servos position via the serial monitor. you type in a letter or an angle and press enter

the next step is to program the claw to be controlled directly. Push the left the right arrow key and servo1 rotates clockwise, release it and it stops.

is the using Processing or another program the only way to do this? i had a look at the website and it seems to be mainly graphics programming. does anybody know of a way to do this using just the Arduino?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46227
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Push the left the right arrow key and servo1 rotates clockwise, release it and it stops.
Which key is "the left the right arrow key"?

You can make Processing send one value when a key is pressed, and another value when the key is released. Using arrow key is difficult, but using alphabet keys is easy. 'A' means pressed, and 'a' means released, for the A key.

Quote
does anybody know of a way to do this using just the Arduino?
Take a look at your Arduino. Do you see a keyboard? Mine doesn't have one.

You can attach switches to the Arduino, and make things happen when the switch is pressed or when it is released.
Logged

0
Offline Offline
Tesla Member
***
Karma: 118
Posts: 8956
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Two things to work on. First is having the servos move slower than normal so they can be positioned accurately. Second is developing an interface on the pc to connect to the arduino. Might be possible with a web page interface using the mouse for control.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Pages: [1]   Go Up
Jump to: