Go Down

Topic: AX12 with Arduino Micro (Read 8 times) previous topic - next topic

swathisham

Hello,
I am working on dynamixel servos with the help of arduino micro.
http://www.robotis.com/xe/dynamixel_en
Here is a small bit of code I have written to get the feedback from the motor.
The libraries I have used are attached below.
The code I have written is

Code: [Select]

#include <SoftwareSerial.h>
#include<ax12.h>
int a=0,a0=0;

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() 
{
  ax12Init(1000000);
  Serial1.begin(9600);
  mySerial.begin(4800);

 
}


void loop()
{
a=0;


a=readData(3,AX_PRESENT_POSITION_L,2);
a0 = status_data;
mySerial.println(a0);
delay(1000);
 
}




Hardware Setup:
I have shorted the RX and TX pins of the arduino and connected it to the control pin of the motor.
Pins 10 and 11 are connected to the computer through software serial.

When I tried to send data to the motor, it worked perfectly.
But, I am not able to receive any data.
Please help me out.

Thanks







NI$HANT

The RX/TX pins you shorted are connected to the hardware FTDi or ATmega8u2 based serial converter chip so you arent able to receive, rest the problem isn't that much clear, and why did you actually shorted the RX/TX?
"Real Men can Accomplish  Anything"
- <a href="http://www.winacro.com">  <b><font color="red">Website</font></b> </a> 
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੁਂ!

Go Up