Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
The Software Servo Library can drive servos on all of your pins simultaneously. The API is patterned after the wiring.org servo library but the code is different. You are not limited to 8 servos, but you must call the Servo::refresh() method at least once every 50ms or so to keep your servos updating.Standard Methodsattach(int) Turn a pin into a servo driver. Calls pinMode. Returns 0 on failure. detach() Release a pin from servo driving. write(int) Set the angle of the servo in degrees, 0 to 180. read() return that value set with the last write(). attached() return 1 if the servo is currently attached.
#include <Servo.h>Servo servo1; // servo1 is now a servo objectServo servo2; // servo2 is now a servo objectvoid setup(){ servo1.attach(5); // Set a servo pin to be pin 5 servo2.attach(6); // set a servo pin to be pin 6}void loop(){servo1.write(90); // set servo1 to go to 90 degree angleservo2.write(45); // set servo2 to go to 45 degree angledelay(15); // wait 15 mS for the servo to get there Servo::refresh(); //keep your servos updating}
Well, errr... You use Arduino software, right? There are buttons right below the menu bar, Upload to the board is the second from right to left if you hold the mouse over it it will say it's name.
than what do you use to program your Roboduino
what, so you can program the roboduino with C as well as arduino?
Well, I hope you're not offended.
I only use the GCC compiler.
If that is true then I should beable to use Admin's hex file on Photovores for the fifty dollar robot and use my AVRISPmk11 to upload it to the Roboduino?
Yes, you can! Airman00 was also working on a page for the $50 robot on Roboduino. It may be done allready
Airman00 was also working on a page for the $50 robot on Roboduino. It may be done allready