Pages: [1]   Go Down
Author Topic: AX12 with Arduino Micro  (Read 7899 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#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







* ax12.cpp (5.25 KB - downloaded 9 times.)
* ax12.h (2.38 KB - downloaded 12 times.)
Logged

Forum Moderator
ਪੰਜਾਬ
Offline Offline
Edison Member
*****
Karma: 12
Posts: 1601
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

Pages: [1]   Go Up
Jump to: