Paulmac 0 Posted February 21, 2014 Share Posted February 21, 2014 G'day oh 43oh wise ones. Could someone who owns an RC servo please verify this? When I load the code from Examples/Servo/Sweep into my Launchpad v1.5 (with a 2553), the servo jitters with a very regular (~1 second) timing. // Sweep // by BARRAGAN <http://barraganstudio.com> // This example code is in the public domain. #include <Servo.h> Servo myservo; // create servo object to control a servo // 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 } void loop() { myservo.write(90); //Set 90 degrees } /* void loop() { for(pos = 0; pos < 180; pos += 20) // 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(2000); // waits 15ms for the servo to reach the position } for(pos = 180; pos>=1; pos-=20) // goes from 180 degrees to 0 degrees { myservo.write(pos); // tell servo to go to position in variable 'pos' delay(2000); // waits 15ms for the servo to reach the position } } */ Notice I kept the example simple by just requesting one angle. The commented out code is a slightly modified version of the Example Servo Sweep code that further demonstrates the issue. Just for reference, Win 7, Energia 0010 or 0011. Turnigy 1258 servo. Also downloaded Energia 0011 on another PC and compiled from there. When the same Example code (ie Servo/Sweep) is loaded into an Arduino Mega, there is no jitter whatsoever. The servo moves to the requested position and shuts up. Any ideas (and thanks in advance!)? Paul Quote Link to post Share on other sites
energia 484 Posted February 25, 2014 Share Posted February 25, 2014 Thank you for the report. I am able to reproduce it. If you have a github.com account would you please be so kind to file an issue here: https://github.com/energia/Energia/issues?state=open If not then let me know and I will file it for you. Quote Link to post Share on other sites
Paulmac 0 Posted February 25, 2014 Author Share Posted February 25, 2014 Issue created here I'm very familiar with PIC programming at assembly level, but I'm at the bottom of a steep learning curve with Energia! Many thanks. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.