Hi everyone,
I am new to the whole world of robotics and have decided I would like to build a quadruped robot.
The parts I have chosen are the Arduino Mega 2560 R3 and dynamixel AX12A servos. Various other sensors will be incorporated later.
The problem I seem to be having at the moment is that I am not able to write angles to my servo. When I call .attached() I get a true.
At the moment I have the arduino board powered through usb and the servo is powered with a 11.1V external power source with its ground connected to the arduinos with a connection between pins 23 (digital pin 10) and the info line of the servos
This is the code I have been trying to run
Code:
#include <Servo.h>
Servo myservo;
void setup()
{
Serial.begin(9600);
myservo.attach(23);
// delay(500);
myservo.write(45);
// delay(1000);
Serial.println(myservo.read());
}
void loop()
{
}
As far as I understand the servo library allows direct angle writing like this to servos using TTL half duplex com protocol.
Perhaps it is in how I am supplying power to the servo but I dont see why It would be a problem doing it this way.
Thanks alot
Bookmarks