If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
iRobot Create Interface - Help with Dec to Bin conversion
6 posts
• Page 1 of 1
iRobot Create Interface - Help with Dec to Bin conversion
I'm attempting to build a control interface for the iRobot Create using Flowstone. I'm doing this using the Open Interface Protocols from iRobot and need to be jumping back and forth between binary, hex, and decimal with the control instructions. There is an Int to Hex component, but I'm having trouble figuring out how to convert to binary (easily). Am I overlooking a component or is there an easy way to do this? Thanks for any help anyone can give me.
PS - Flowstone is a great development and educational platform . I teach high school courses in computer science, robotics, and pre-engineering. My robotics class uses iRobot Creates quite heavily and my plan is to get my interface running so that I can use Flowstone in some of my second semester classes. Thanks to the developers!
PS - Flowstone is a great development and educational platform . I teach high school courses in computer science, robotics, and pre-engineering. My robotics class uses iRobot Creates quite heavily and my plan is to get my interface running so that I can use Flowstone in some of my second semester classes. Thanks to the developers!
- jvincent
- Posts: 4
- Joined: Sat Nov 20, 2010 3:44 pm
Re: iRobot Create Interface - Help with Dec to Bin conversio
If I need binary I just make a simple module that uses boolean algebra to decode the individual bits. There is no hex or dec to binary module. Usually it's not actually binary you need but the discrete bits out for say a digital output board (8 outs etc).
If you are still struggling, I can send you an example
If you are still struggling, I can send you an example
- DSP
- Posts: 150
- Joined: Fri May 14, 2010 10:55 pm
Re: iRobot Create Interface - Help with Dec to Bin conversio
The Create Open Interface consists of a set of opcodes (for specific instructions) followed by data bytes. Unfortunately, many of the data bytes are defined as integer values that need to be converted into binary and broken into two seperate 8 bit bytes to send to the Create. For example, to move the Create forward at 500 mm/s, 500 must be converted to binary (111110100), padded to 16 bits (0000000111110100), broken into a "high byte" and "low byte" (high byte = 00000001, low byte = 11110100), and then the opcode byte and the two data bytes are sent to the Create. I'm converting data to Hex to make it easier to view the data set.
Because of the way the Open Interface is set up, I'm not sure if your suggestion would work DSP. But I appreciate your reply and I could be wrong, so I'll play around with your idea see if I get anywhere. Any other ideas?
Because of the way the Open Interface is set up, I'm not sure if your suggestion would work DSP. But I appreciate your reply and I could be wrong, so I'll play around with your idea see if I get anywhere. Any other ideas?
- jvincent
- Posts: 4
- Joined: Sat Nov 20, 2010 3:44 pm
Re: iRobot Create Interface - Help with Dec to Bin conversio
I figured out how to get my Decimal to Binary conversions to work using some comparisons and an int loop. If anyone is interested in the modules, let me know.
- jvincent
- Posts: 4
- Joined: Sat Nov 20, 2010 3:44 pm
Re: iRobot Create Interface - Help with Dec to Bin conversio
Another option is to use Selectors to select the binary value. This way it's always padded.
Have a look at this example:
This converts an Int - Hex then to 8 bit Binary
Have a look at this example:
This converts an Int - Hex then to 8 bit Binary
- Attachments
-
- Dec_Hex_Bin.fsm
- Decimal to Hex to Binary
- (541 Bytes) Downloaded 2095 times
- DSP
- Posts: 150
- Joined: Fri May 14, 2010 10:55 pm
Re: iRobot Create Interface - Help with Dec to Bin conversio
That is very similar to the way I did it. Although I overcomplicated the index value for the selector, you have it set up in a much more clever way (I used a loop and a comparison). Thanks for your help!
- jvincent
- Posts: 4
- Joined: Sat Nov 20, 2010 3:44 pm
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests