Remove these ads by
Signing UpStep 1Parts List
Arduino-$30-35 USD
Find out where to buy those here.
Jumper Wires-$8.50 USD
I got mine from Amazon
Resistors- Pennies a piece
Get em from Radio Shack, Digi-Key, Mouser, Jameco, etc.
Your goin to need two around 100 ohms (brown black brown) and two around 10k ohms(brown black orange). These don't have to be exact.
Servo Motor- $10 USD
Yes, I know this isn't the cheapest one on the internet. Tower Hobbies
Breadboard- $9-$30 USD, Depending on the size.
Amazon
Tactile Switch- $0.20 USD
Only 6,427 left on Digi-Key I just salvaged mine...
| « Previous Step | Download PDFView All Steps | Next Step » |











































I got an Duemilanove in my XMas stocking with a Servo Shield and have tried my darndest to load a rudimentary motor sketch, to no avail.
I've gotten error after error with the #include <Servo.h> and am wondering if you could shed some light?
I have several instances of the arduino folder (thinking that I might have a path issue). One on the root (c:/), one in my documents, and one wherever the unzipper defaults it to. I have tried different paths, and only get different errors, and none of them are very helpful. I see that you just have a plain "#include <Servo.h>", just like the instructions on the Arduino site said, but that not working for me. Any help would be appreciated.
I'm going to give myself an epileptic seziure if all I can do on my new toy is change the blink rate on an LED (which is all I've done). : (
Thanks!
sorry for the late reply...
I program for a living, and this just wasn't intuitive to me. All other programming languages I've used would have picked up on the special characters when doing an include, and would have "included" it on the fly.
Either way, thanks for your insight and response. It was spot on.
Also, I found the best deal, From the arduino website so it is legit, its 28 Dollars, you save like 3-5 Dollars!
http://store.gravitech.us/ardu.html
That is where i am buying mine, Good i'ble Rated ;)
// Sweep
// by BARRAGAN <http://barraganstudio.com>
#include <Servo.h>
Servo myservo; // create servo object to control a servo
Servo myservo2; // a maximum of eight servo objects can be created
int pos = 0; // variable to store the servo position
void setup()
{
myservo.attach(9); // attaches the servo on pin 9 to the servo object
myservo2.attach(10);
}
void loop()
{
for(pos = 0; pos < 180; pos += 10) // goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(20); // waits 15ms for the servo to reach the position
}
for(pos = 180; pos>=1; pos-=10) // goes from 180 degrees to 0 degrees
{
myservo2.write(pos); // tell servo to go to position in variable 'pos'
delay(20); // waits 15ms for the servo to reach the position
}
for(pos = 180; pos < 0; pos += 10) // goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(20); // waits 15ms for the servo to reach the position
}
for(pos = 1; pos>=180; pos-=10) // goes from 180 degrees to 0 degrees
{
myservo2.write(pos); // tell servo to go to position in variable 'pos'
delay(20); // waits 15ms for the servo to reach the position
}
}
Lol try it, and then tell me(i understand your english :P) How to make one start going right while the other one is in neutral... =/
thanks