tried both, neither worked lol
Printable View
tried both, neither worked lol
this is what I need! :D
http://www.01mech.com/supermodified
http://www.01mech.com/supermodified_arduino
You want to change the 'delay(100)' in the 'while' loop. What did you change it to? Try upping it to a few hundred and see if you see a difference...this is milliseconds we're dealing with here, you're not gonna notice any difference if you only change it by a few.
I changed it to 500 and it didn't change a thing, I'll try higher
tried it @ 1000 and 5000, nothing changed lol
found this over on the Arduino forum:
now how would I work it into my sketch?Code:const int angleIncrement = 1;
const int incrementDelay = 10;
for (int angle = 0; angle < 180; angle += angleIncrement) { // single "degree" increments
myServo.write (angle);
delay (incrementDelay); // so we'll take 10 * 180 milliseconds = 1.8 seconds for the traverse.
}
What that's doing is pretty much what I'm doing with my code. Are you sure the code is uploading?
EDIT: Just a note. When you want to increase the delay, update the lines with
Increasing the delay at the end won't slow down the servo much.Code:myservo.write(val);
delay(100);
yes it's uploading, the board it resetting and everything. I'm changing the control pin from 7 to 5 to test it so I don't actually have to shut down the computer, and it doesn't seem to be slowing at all. I've changed that value to 500, 1000 and 5000 with no change in speed
Hmmm, there's definitely something wrong here...at 5000 it should take it 15 minutes to close all the way (180 degrees)....
EDIT:
Just to make sure, this is the place where you're changing the delay time right?
Code:else {
while(val<OFF_POSITION){
val++;
myservo.write(val);
delay(100);
}
myservo.write(OFF_POSITION); // sets servo position to 180 if above statment is false
}
that's the one. FYI from full open to full close it's only moving ~70º or so, but still, it's just as snappy, takes .5 sec or less, just like in the vid
a guy over on the Arduino forums said he's adding something to the servo library and to look for it later today. I just looked and nothing yet.
http://www.arduino.cc/cgi-bin/yabb2/...num=1276899740