HUV bus interface board + dynamixel AX-12+ + c++

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
9 postsPage 1 of 1
9 postsPage 1 of 1

HUV bus interface board + dynamixel AX-12+ + c++

Post by sena » Thu May 29, 2008 3:46 pm

Post by sena
Thu May 29, 2008 3:46 pm

Hi.

I tried to connect dynamixel AX -12+ with HUV interface and C++(Xcode).

I made a success in opening serial connection.

But I could not send data...
Hi.

I tried to connect dynamixel AX -12+ with HUV interface and C++(Xcode).

I made a success in opening serial connection.

But I could not send data...
sena offline
Newbie
Newbie
Posts: 4
Joined: Thu May 29, 2008 3:29 pm

Post by StuartL » Fri May 30, 2008 7:22 am

Post by StuartL
Fri May 30, 2008 7:22 am

This is probably best asked in the Robotis/Bioloid forum. I'll move this post.
This is probably best asked in the Robotis/Bioloid forum. I'll move this post.
StuartL offline
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Post by JonHylands » Fri May 30, 2008 5:28 pm

Post by JonHylands
Fri May 30, 2008 5:28 pm

sena,

What baud rate did you open the port at?

What bytes specifically are you sending?

Does either/both the green/red LED on the board light up when you send this command?

- Jon
sena,

What baud rate did you open the port at?

What bytes specifically are you sending?

Does either/both the green/red LED on the board light up when you send this command?

- Jon
JonHylands offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by sena » Sat May 31, 2008 3:04 am

Post by sena
Sat May 31, 2008 3:04 am

I open the port at 9600bps.

c++ code.

serial.writeByte('0xff');
serial.writeByte('0xff');
serial.writeByte('0x00');
serial.writeByte('0x05');
serial.writeByte('0x03');
serial.writeByte('0x11');
serial.writeByte('0x04');
serial.writeByte('0x04');
serial.writeByte('0xde');

Yes,both green LED and red LED are light up.

I’m a c++ beginner...
I open the port at 9600bps.

c++ code.

serial.writeByte('0xff');
serial.writeByte('0xff');
serial.writeByte('0x00');
serial.writeByte('0x05');
serial.writeByte('0x03');
serial.writeByte('0x11');
serial.writeByte('0x04');
serial.writeByte('0x04');
serial.writeByte('0xde');

Yes,both green LED and red LED are light up.

I’m a c++ beginner...
sena offline
Newbie
Newbie
Posts: 4
Joined: Thu May 29, 2008 3:29 pm

Post by JonHylands » Sun Jun 01, 2008 12:09 am

Post by JonHylands
Sun Jun 01, 2008 12:09 am

sena wrote:I open the port at 9600bps.


That's the first problem. You have to open the port at 1,000,000 bps.

- Jon
sena wrote:I open the port at 9600bps.


That's the first problem. You have to open the port at 1,000,000 bps.

- Jon
JonHylands offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 512
Joined: Thu Nov 09, 2006 1:00 am
Location: Ontario, Canada

Post by sena » Mon Jun 02, 2008 3:08 am

Post by sena
Mon Jun 02, 2008 3:08 am

I tried to open serial port at 1Mbps.

But I could select serial port up to 115200bps.

How do I make up to 1Mbps?
I tried to open serial port at 1Mbps.

But I could select serial port up to 115200bps.

How do I make up to 1Mbps?
sena offline
Newbie
Newbie
Posts: 4
Joined: Thu May 29, 2008 3:29 pm

Post by StuartL » Mon Jun 02, 2008 7:41 am

Post by StuartL
Mon Jun 02, 2008 7:41 am

sena wrote:I tried to open serial port at 1Mbps.

But I could select serial port up to 115200bps.

How do I make up to 1Mbps?


This sounds like an Xcode question. I've had a look and it looks mostly POSIX compatible, therefore I guess you're using an ioctl to set the serial baud rate?

If you can locate the header file that defines the constants for that ioctl() call you can find out if there's one for 1Mbit.

Update: Looks like it uses the standard 'B' constants, where 'B9600' is 9600 baud. Try 'B1000000' and see what happens :)
sena wrote:I tried to open serial port at 1Mbps.

But I could select serial port up to 115200bps.

How do I make up to 1Mbps?


This sounds like an Xcode question. I've had a look and it looks mostly POSIX compatible, therefore I guess you're using an ioctl to set the serial baud rate?

If you can locate the header file that defines the constants for that ioctl() call you can find out if there's one for 1Mbit.

Update: Looks like it uses the standard 'B' constants, where 'B9600' is 9600 baud. Try 'B1000000' and see what happens :)
StuartL offline
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Post by sena » Mon Jun 02, 2008 6:11 pm

Post by sena
Mon Jun 02, 2008 6:11 pm

I couldn't write code on termios.h

I found out ioctl.h and ioctl(int, unsigned long, ...);

Is it taking the place of serial's setup?

I want to know about ioctl.
I couldn't write code on termios.h

I found out ioctl.h and ioctl(int, unsigned long, ...);

Is it taking the place of serial's setup?

I want to know about ioctl.
sena offline
Newbie
Newbie
Posts: 4
Joined: Thu May 29, 2008 3:29 pm

Post by StuartL » Tue Jun 03, 2008 6:46 am

Post by StuartL
Tue Jun 03, 2008 6:46 am

sena wrote:I want to know about ioctl.


I found lots of Xcode termios/serial/ioctl examples with google when I made the previous post.
sena wrote:I want to know about ioctl.


I found lots of Xcode termios/serial/ioctl examples with google when I made the previous post.
StuartL offline
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK


9 postsPage 1 of 1
9 postsPage 1 of 1