I am writing a code to control 2 servo motors with an accelerometer. One motor for each axis.
First I tried this program to make sure my servo is working.
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
myservo.attach(9); // attaches the servo on pin 9 to the servo object
As you you the servo would work on pin 9.
I tried editing the same to make 2 servos works with the code below. didn’t yield any result. I am not into coding and I am having a real tough time fixing this issue.
I even used the memsic 2125 debug serial statement and tried making changes to make the servos work but hasn’t been helpful at all.
If anyone has any suggestions or program of how to make control a HS325Hb Servo motors with a accelerometer will be really helpful.
I need to submit this as a project and I’m looking forward for some help regarding the same.
If any one has programmed it earlier PLEASE let me know, any help regarding the matter would be great. Sorry for all the trouble.
Thank you all