by Dewey » Mon Jun 25, 2007 10:02 am
by Dewey
Mon Jun 25, 2007 10:02 am
Hi ryann2k1
Sorry if the following is over the top but I am not sure what aspect you want advise/clarification on.
The thing to remember is that the CM5 has software embedded to allow two CM5s to talk wirelessly. To use the facility as designed by Robotis you must buy a pair of Zig100s and solder them into the CM5s. Follow the example in the User Guide page 101 onwards and it all works. The software transmits over the Zig100 at 57142 baud using the protocol I listed. What you have to do is connect one of your two Zig100s to the PC via the Zig2Serial and a USB to Serial cable, addressing the added complication of ensuring the Zig2Serial has a power source.
The PC now must send and receive using the USB Serial connection at 57142 baud in the format the CM5 uses. As far as the CM5 is concerned it is talking to amother CM5, or so it 'thinks'. You can now send and receive integers numbers to/from the CM5 running a Behavior Control Problem similar to User Guide page 104.
We must ensure the format these integers are sent in by the PC are encoded as the CM5 expects, and when the CM5 sends they are decoded by the PC. The crunch is you CANNOT use the Robot Terminal program at the PC to do this as it is just a text send/receive Dumb Terminal. You must write a program for the PC. You can use any programming language you have e.g. Visual Basic, C++, Delphi. I use Delphi, my program looks for number input from the keyboard say 2049 and encodes it and transmits it as hexadecimal [FF 55 01 FE 08 F7] down the USB Serial cable. It then looks for input from the USB Serial Cable and Decodes it and displays it as a decimal number, in pseudo code:
Start PC Program
Set USB Serial Cable to 57142 baud
Repeat
If input from PC Keyboard Then
Begin
Read it
Code it to CM5 format
Transmit dowm USB Serial Cable
End
If input from USB Serial Cable Then
Begin
Read it
Decode CM5 format
Display on PC Screen
End
Until The Cows Come Home (i.e. for ever)
End PC Program
Once you have this working, you have cracked it, you can make the program as fancy as you like but basically its only adding sugar to the basics.
The Crunch is you must have access to a Program Development Environment running on your PC and be able to implement a program along the lines of above. You cannot do it using just the software supplied by Robotis!
Hope this is helpful.
Dewey
Hi ryann2k1
Sorry if the following is over the top but I am not sure what aspect you want advise/clarification on.
The thing to remember is that the CM5 has software embedded to allow two CM5s to talk wirelessly. To use the facility as designed by Robotis you must buy a pair of Zig100s and solder them into the CM5s. Follow the example in the User Guide page 101 onwards and it all works. The software transmits over the Zig100 at 57142 baud using the protocol I listed. What you have to do is connect one of your two Zig100s to the PC via the Zig2Serial and a USB to Serial cable, addressing the added complication of ensuring the Zig2Serial has a power source.
The PC now must send and receive using the USB Serial connection at 57142 baud in the format the CM5 uses. As far as the CM5 is concerned it is talking to amother CM5, or so it 'thinks'. You can now send and receive integers numbers to/from the CM5 running a Behavior Control Problem similar to User Guide page 104.
We must ensure the format these integers are sent in by the PC are encoded as the CM5 expects, and when the CM5 sends they are decoded by the PC. The crunch is you CANNOT use the Robot Terminal program at the PC to do this as it is just a text send/receive Dumb Terminal. You must write a program for the PC. You can use any programming language you have e.g. Visual Basic, C++, Delphi. I use Delphi, my program looks for number input from the keyboard say 2049 and encodes it and transmits it as hexadecimal [FF 55 01 FE 08 F7] down the USB Serial cable. It then looks for input from the USB Serial Cable and Decodes it and displays it as a decimal number, in pseudo code:
Start PC Program
Set USB Serial Cable to 57142 baud
Repeat
If input from PC Keyboard Then
Begin
Read it
Code it to CM5 format
Transmit dowm USB Serial Cable
End
If input from USB Serial Cable Then
Begin
Read it
Decode CM5 format
Display on PC Screen
End
Until The Cows Come Home (i.e. for ever)
End PC Program
Once you have this working, you have cracked it, you can make the program as fancy as you like but basically its only adding sugar to the basics.
The Crunch is you must have access to a Program Development Environment running on your PC and be able to implement a program along the lines of above. You cannot do it using just the software supplied by Robotis!
Hope this is helpful.
Dewey