Show Posts
Pages: [1]
1  Using Arduino / Installation & Troubleshooting / Re: Arduino Mega serial port not detected on: February 25, 2013, 08:21:26 pm
It seems that the ATmega16U2 chip to handle the communication between the USB and the 2560 microcontroller is blown.
http://arduino.cc/en/Main/arduinoBoardMega2560

If the sketch is running, you could program your sketch using a programmer and the ISCP header. That si a way to program the 2560 microcontroller without the USB communication.

How to check if the connection is blown?

Do you have a reference to program with the ISCP header?

I have try different USB cable and different computer and it seems, all the computer do not able to detect the arduino.

2  Using Arduino / Installation & Troubleshooting / Arduino Mega serial port not detected on: February 25, 2013, 05:21:04 am
Hi,

I have Arduino Mega 2560 running on Windows XP. Previously, I have succesfully uploaded a program to drive the motor into my Arduino and the program running succesfully.

Now I am trying to reupload a new program to my Arduino but the software does not detect the COM port of arduino. I have checked the device manager and the device manager does not detect any arduino hardware. However, my previous program still able to run.

Does anyone know what is the problem with my arduino?

PS: When I plug the USB cable to the arduino, the power LED and pin 13 LED is on. The LED for Tx and RX are not blinking
3  Topics / Robotics / Re: DC motor position control using potentiometer - HELP! on: January 22, 2013, 11:30:25 pm
May I know how you control the position?
turning the potentiometer ? or by giving a signal?
4  Topics / Robotics / Re: Need help in connecting Arduino with Dynamixel RX-64 on: January 21, 2013, 05:37:21 am
Still not working

 smiley-cry smiley-cry smiley-cry smiley-cry

Does it got relation with the baud speed that I set up?
Does Dynamixel need higher baud rate to communicate?
5  Topics / Robotics / Re: Need help in connecting Arduino with Dynamixel RX-64 on: January 21, 2013, 03:30:39 am
Yup.
Just in case that I miss the data transmitted.
However, I do not get any result out. As I expected when the serial1 received the data, it should go out of the loop and print the value that is stored at "inbyte"
6  Topics / Robotics / Re: Need help in connecting Arduino with Dynamixel RX-64 on: January 20, 2013, 09:44:27 pm
Quote
I only obtain the data FFFFFF from the motor.
That suggest to me that you haven't fixed your code, and that you're reading -1 == "No serial data available" from your port.
Please post your code.

Hi AWOL,

I fixed the code already.

Code:
//___________________________________________________________________
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// Initial condition
//___________________________________________________________________
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

const int RTS = 4;   //1= transmit, 0 =receive
byte ping  =0x01;
byte READ  =0x02;
byte WRITE =0x03;
byte REG   =0x04;
byte ACTION=0x05;
byte RESET =0x06;
byte SYNC  =0x83;
byte BEGIN =0xff;
int incomingByte = 0;


//___________________________________________________________________
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// Setup Function
//___________________________________________________________________
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void setup () {
  pinMode(RTS, OUTPUT);
  Serial.begin(57600);
  Serial1.begin(57600);

}

// Main function
void loop()
{
  byte notchecksum;
  byte motor_ID=0x01;
  byte length=0x02;
  digitalWrite(RTS,HIGH);
  delay (5);
  notchecksum=~(motor_ID + length + ping);
  Serial1.write(BEGIN);
  Serial1.write(BEGIN);
  Serial1.write(motor_ID);
  Serial1.write(length);
  Serial1.write(ping);
  Serial1.write(notchecksum);
  digitalWrite(RTS,LOW);
  // send data only when you receive data:
while (Serial1.available() == 0)
{
     incomingByte = Serial1.read();
  }
  incomingByte = Serial1.read();
  Serial.print(Serial1.available(),HEX);
  delay(1000);
}//This is program to send data to servo

Now, is the serial monitor does not give any display. I suspect that it keep stuck inside the WHILE loop.
Now, I am wondering if my Dynamixel motor does not send any data or, My 485 breakout circuit does not send me any data.
Do you have any idea?


Thanks
7  Topics / Robotics / Re: Need help in connecting Arduino with Dynamixel RX-64 on: January 17, 2013, 07:37:02 pm
Yup. I have try to correct it. The result is still the same. I only obtain the data FFFFFF from the motor.

Anyone have try to connect the dynamixel and arduino with simple programming before?
8  Topics / Robotics / Re: Need help in connecting Arduino with Dynamixel RX-64 on: January 16, 2013, 05:07:03 am
Thanks.

My mistake.

Actually What I want to do is :
1. Send ping command to dynamixel
2. Obtain the return packet from dynamixel.

Do you have any code to obtain the return packet from dynamixel?. So far I do not able to obtain any return packet.
9  Topics / Robotics / Need help in connecting Arduino with Dynamixel RX-64 on: January 16, 2013, 04:00:41 am
Hi,

I need help to connect my Arduino Mega with dynamixel RX-64. Basically I tried to use RS-485 breakout and follow this schematic for connection (http://www.pablogindel.com/informacion/the-arduinodynamixel-resource-page/) and I use below code to try to Ping the motor
Code:
//___________________________________________________________________
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// Initial condition
//___________________________________________________________________
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

const int RTSpin = 2;   //1= transmit, 0 =receive
byte ping  =0x01;
byte READ  =0x02;
byte WRITE =0x03;
byte REG   =0x04;
byte ACTION=0x05;
byte RESET =0x06;
byte SYNC  =0x83;
byte BEGIN =0xff;
int incomingByte = 0;


//___________________________________________________________________
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// Setup Function
//___________________________________________________________________
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void setup () {
  pinMode(RTSpin, OUTPUT);
  Serial.begin(57600);
  Serial1.begin(57600);

  byte notchecksum;
  digitalWrite(RTSpin,HIGH);
  delay (5);
  notchecksum=~(0x01 + 0x02 + ping);
  Serial1.write(BEGIN);
  Serial1.write(BEGIN);
  Serial1.write(0x01);
  Serial1.write(0x02);
  Serial1.write(ping);
  Serial1.write(notchecksum);
  Serial1.write(0);
  digitalWrite(RTSpin,LOW);
  // send data only when you receive data:
while (Serial.available() < 0) {
     incomingByte = Serial1.read();
     Serial.print(incomingByte,HEX);
     delay(1000);
  }
}

// Main function
void loop()
{
  //This is program to send data to servo

}
I am expecting to get a data of 0XFF 0XFF 0X01 0X02 0X00 0XFC but instead the serial monitor give me back the data 0XFF 0XFF 0XFF 0XFF 0XFF 0XFF.

Can anyone advice me what is wrong with my code?

Thank you

Moderator edit: CODE TAGS added
Pages: [1]