- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I'd like to control Robotis Corp's Dynamixel.
The Code ls
void setup(){
Serial.begin(1000000);
}
void loop()
{
//Packet_Baudrate(207);
Packet(0xFE, 600);
delay(1000);
Packet(0xFE, 400);
delay(1000);
}
void Packet( unsigned char ID, unsigned int Angle)
{
unsigned char Check_Sum, Header = 0xFF;
Serial.write(Header);
Serial.write(Header);
Serial.write(ID);
Serial.write(0x05); // length
Serial.write(0x03);// instruction
Serial.write(0x1E); // address
Serial.write(Angle);// value1
Serial.write(Angle>>8);//value2
Check_Sum = ~(ID + 0x05 + 0x03 + 0x1E + Angle + (Angle>>8));
Serial.write(Check_Sum);
}
This cord works really good at Arduino Uno, But It doesn't work at Galileo.
How can I Solve it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello ParkJaeHyun,
If you want to send serial data through pins 0 and 1, then you should set the serial object as Serial1 instead of Serial. Try changing the serial object Serial to Serial1, and test the code again.
Regards,
Diego.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello ParkJaeHyun,
If you want to send serial data through pins 0 and 1, then you should set the serial object as Serial1 instead of Serial. Try changing the serial object Serial to Serial1, and test the code again.
Regards,
Diego.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page