loading
 
Arduino Mega+RoboRealm
Maveric from Australia  [1 posts]
5 years
Hi all,

First, thanks to the guys at RoboRealm for this amazing piece of software. I am a new user of Roborealm and I plan to interface with my Arduino Mega.

In essence what I plan to do is to extract the rgb values from a camera image and send those three values over to the micro-controllers as input. Is there a way out? There is a roborealm program (see attached) that does this, but I want those values send over to the Arduino Mega.

Thank you very much in advance.
program.robo
Alan Coggins from Australia  [32 posts] 5 years
Hi Maveric,

Not quite clear on what your plans are, but I have done some work with roborealm and an arduino board and the interface was fairly straightforward. It sounds like you might just need to use a small vbscript program to manipulate the variables so that they can then be used by the arduino module. Have you tried this?

Cheers,

Alan
Maveric from Australia  [2 posts] 5 years
Thank you very much Alan for your kind response. Up till now I am still not able to find solution to my problem. May be I need to break it down.

Basically what I want to do is to extract the following variables (MEAN_COLOR_R, MEAN_COLOR_G, MEAN_COLOR_B) of the camera frame and pass those values to three PWM pins of my Arduino.

Now after a few days of reading through the forum, I am able to use the RR Serial Module to select the variable MEAN_COLOR_R (I want to start with one variable first) and send to my Arduino connected to the arduino's serial port. I have attached a figure showing the selection I made in the module.

Meanwhile, I can see that the Arduino board is receiving something, but I don't know the structure of the serial data. For instance does the data come with a header or not I am not sure? Are the values on the left side pointed to by the blue arrow in the manage part of the data?

And because, my Arduino is communicating with RR through its USB port, I cannot use the IDE to verify the data format. I will be grateful for any help on this problem, it is really frustrating. Thanks

 
Alan Coggins from Australia  [32 posts] 5 years
Hi Maveric - when you say you want to pass the values to the PWM pins on the Arduino, do you mean you want the PWM pins to do something (like control a servo)? What is the end result you are aiming for ie what are you going to be doing with the R, G, B values?
Anonymous 5 years
Maveric,

Have you played with the Sparkfun_Arduino module at all? Assuming you can download the Sketch code its simple to pass the mean values to PWM pins. (See attached program).

If you want more control than that, you can also try the MCU_Communicatior which has a framework to pass variables to the Arduino for your own use.

Finally the serial is very much a roll your own API so if you can include the Sketch that you are using that may be a bit more enlightening for us. FYI, you seem to have the buad rate set to 4800 which is very slow ... any reason for that?

http://www.roborealm.com/help/Sparkfun_Arduino.php

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index