assigning servo positions?

2 views
Skip to first unread message

Tim

unread,
Aug 30, 2008, 2:53:31 PM8/30/08
to DorkbotPDX Arduino Cult Induction
ok, i installed the zip file to my library then the cut and pasted the
servotimer1 code and it loaded to the board ok.

now, how do i send signals to change servo position? Do I have to
change a line of code in the program and reload it every time. I
thought i saw someone just typeing things like w180 or v120 or
something like that and moving the servo.

Brian Richardson

unread,
Aug 30, 2008, 5:01:51 PM8/30/08
to dorkbotpdx-ardui...@googlegroups.com
Yeah, the example explains it like this:

"The following code lets you send strings like "90s" and "80w" to position servos on pin 9 and 10 to 90 degrees and 80 degrees. You can also use "d" to detach the servo on pin 10 and "a" to reattach it. Ok, it is a silly program but it works for testing. "

The thing you might not just magically know is that you send strings using the "Serial Monitor", it's the last icon in the toolbar at the top of the IDE.  When you click it, the bottom of the IDE will change into an input box and a listbox.  You can type things into the input box to send data to the Arduino and the listbox below it will print out anything the Arduino sends back.  Here's a big tutorial on the serial stuff:  http://www.ladyada.net/learn/arduino/lesson4.html

Hope that helps!

Tim

unread,
Aug 30, 2008, 9:12:30 PM8/30/08
to DorkbotPDX Arduino Cult Induction
thanks brian, but what do i type into the seial monitor? just "90s"
or "70w" does the "v" parameter control position? do i set "v = 90w"?

Donald Delmar Davis

unread,
Aug 30, 2008, 9:33:26 PM8/30/08
to dorkbotpdx-ardui...@googlegroups.com
Yes 

but 90s will tell the servo to go where it currently is.
so try 10s or 100s
and 100s or 10w and you should see some motion.

Don

Donald Delmar Davis

unread,
Aug 30, 2008, 9:45:15 PM8/30/08
to dorkbotpdx-ardui...@googlegroups.com
er 100w or 10w

Donald Delmar Davis

unread,
Aug 30, 2008, 9:45:21 PM8/30/08
to dorkbotpdx-ardui...@googlegroups.com
er 100w or 10w

On Aug 30, 2008, at 6:33 PM, Donald Delmar Davis wrote:

Reply all
Reply to author
Forward
0 new messages