loading

MCU Communicator

The MCU Communicator module provides a way to transmit RoboRealm variables to Microprocessors that are connected via a serial (or usb to serial) interface to a PC. While RoboRealm supports many other hardware devices with dedicated interfaces the MCU Communicator provides an easier way to 'roll your own' in terms of sending information from the PC to the MCU and have the MCU react to that information. The module requires that the appropriate communications program be on the MCU that understands the module's requests. The onboard program is meant to be as small as possible without sacrificing functionally or reliability with the expectation that you integrate the communications portion within your own application.

The goal of the MCU gateway program was to provide a small but effective way of communicating between the PC and the MCU that allows for ease of use and flexibility in what you need to send or receive. Currently several MCU's have the supported application provided. These also provide examples as to how other MCU's may also be integrated. If you require these applications for MCU's that are not currently supported you can Contact Us to see if we can help out.

The interface provides for a total of 20 mailboxes. A mailbox is what is used to send or receive information based on the type of mailbox. You need to specify the name, type and direction of the mailbox. Keep in mind that the mailbox direction is with respect to RoboRealm. Thus a "get" means receive information from the MCU to the PC, whereas "send" means send information from the PC to the MCU.

As most MCU's are not capable of floating point numbers the term "Number" refers to an integer value. If you need to transmit a floating point number you should first multiply that number by some factor (like 1000) and then send the result as an number/integer.

Note that while 20 mailboxes are supported your MCU program can use fewer than 20 if memory space is a concern. You'd just have to be sure not to use those mailboxes beyond the supported amount.

The protocol the MCU Communicator module provides some basic error checking in case you are using a wireless communication which can produce noise in the resulting data. The protocol also supports data streaming from the MCU so that unneeded data requests are avoided.

Gateway Applications

Download Arduino Communicator

Download Orangutan SVP Communicator

Download SOR Axon Communicator

Download Parallax Propeller Communicator

Interface

Instructions

1. Communication - Specify the COM port your device is connected to. Note that with usb to serial connectors they will most likely be higher than the physical COM1-4 ports.

2. Baud Rate - Specify the baud rate of 115200 to communicate with the MCU. Also be sure to support a baud rate that your MCU supports. If you are using a wireless connection you may need to slow down the baud rate depending on the supported rate of the device.

3. Remember As Default - Select the "Remember as Default" checkbox if you would like the current COM setting to be remembered by RoboRealm such that whenever the MCU module is loaded the COM port and BAUD rate will be auto-populated to the current setting. This ability allows you to not have to constantly change the COM port setting when loading in successive RoboRealm robofile configurations.

4. Messaging - Specify the name of the variable you want to transmit. Note that for arrays you will only get the first element of the array. For elements beyond the first you will need to use the variable:index expression like blobs:2 to get the second element of the blobs array. Be sure to note the mailbox number as that number will be the array index within the MCU that will contain the value for that variable.

The MCU communicator supports 3 variable types. A number is a 32 bit integer number represented by 4 bytes. A logic type is a boolean 0 or 1 value represented by a single byte. A text value is a character string terminated by a zero with characters in the traditional ASCII range of 0-127. The maximum string length supported is 256 bytes.

Example

Within the provided gateway programs are examples on how to manipulate the variable contents and send then back to the PC. To test these examples run the following  robofile in RoboRealm and specify the correct COM and baud settings. You can then use the Watch Variable module to see the changes to the variables.

IMAGE_COUNT - what image number you are on. Sent to the MCU
count_plus - should be IMAGE_COUNT+100. The 100 is added within the MCU
hard_code_string - a string sent back from the MCU that never changes
str_to_send - a string sent from the PC to the MCU what will be capitalized
str_to_get - the return string that should be capitalized
str_length - the length of the string received by the MCU to capitalize
logic_send - a logic value sent to the MCU
logic_get - the inverse of logic_send as performed by the MCU

See Also


Serial
Sparkfun Arduino
Pololu Orangutan SVP
Society of Robots - Axon


 New Post 

MCU_Communicator Related Forum PostsLast postPostsViews
merge MPU6050 DMP code
Hi, Steven I'am using MCU communicator to read the data from arduino which is used to get angle data using MPU6050...
6 year 2 1966
Usage of MCU Module with Arduino Mega
Hello, I am currently working on a project involving controlling a submersible (the BlueROV from Bl...
7 year 1 1863
Reliable MCU communication
Hello! I am glad to join the community. I'm looking for a way to reliably pass variables from RoboR...
7 year 5 2170
how to read I2C data in roborealm
I want to use TSL2561 light sensor with RR. How can I read its  I2C data in RR? Sensor has SDA and SCL pins. Can I use...
8 year 2 2224
Bug?
When I try to activate the MCU module RR all but locks up.  Frame rate drops to <1 fps.  Am I doing somet...
9 year 8 2670
RoboRealm Propeller MCU Examples / Help Needed
Well I’ve gotten this far with my Robo Magellan project: ...
10 year 17 3409
Roborealm with Sound Module (MCU)
Hi, I am trying to program sound module with MCU communicator, with case as followed in arduino case 100: // play...
11 year 3 3794
Serial
Hello, I have several questions about Roborealm and Serial Communication.The microcontroller I'm using is Atmega8
12 year 4 3857
Obstacle detection with Ping))), Propeller Servo Controller USB & RR
I purchased a Propeller Servo Controller USB (http://www.parallax.com/Store/Accessories/MotorServoControllers/tabid/160/ProductI...
13 year 3 4403
Ping Ultrasonic Sensor / Arduino / Serial
I'm trying to get the Ping Ultrasonic Sensor by Parallax to work with my Arduino Uno and Roborealm but I can't figure out how...
13 year 5 6359
ABOUT A MODULE FOR ARDUINO BOARD
Steven, any chance soon having a module for the arduino board looks kinda simple since SOR AXON board is close to...
13 year 5 4417
about using the mcu communicator
looking to use the communicator for a atmel AT91SAM9XE128-QU its the one on NEATO XV -11 robot to control on-board...
13 year 6 5470
RD02 Devantech
Hey Steve, How I can to connect the RD02 Devantech Kit with RR?. Can you or somebody to help me. I have Arduino Di...
13 year 4 4367