loading
 
Help with Project
Fraser from United Kingdom  [5 posts]
5 years
I am currently working on a project where i plan on using roborealm to identify the colour of a randomly supplied sweet and then change the output on an arduino.

I have filtered the image form the camera to flaten the colours out and am using the sample_colour function to detect and supply a nearest match from four presets. I am unsure how to progress form hear.

I ahve attached the program so far.
program.robo
Anonymous 5 years
Fraser,

It depends what you mean by "output on an arduino". Do you plan to move a servo? Or change a DIO line?

You'd start using one of the Arduino modules to send the appropriate command to the appropriate area.

Most likely you'd need a small script to prepare the variable with the right value based on your results of the color sample. Without knowing what you want the Arduino to do its hard to know what variables need to be converted/created.

STeven.
Fraser from United Kingdom  [5 posts] 5 years
So  teven .

I am intending to change DIO lines which will connect to to a robot controller.

Fraser
Anonymous 5 years
Fraser,

So how do you want to trigger those DIO lines? Are you intending to trigger a single DIO line based on what color is seen? Or is there a specific combination of DIO lines based on the specific color. Is it

red -> DIO 15 true
green -> DIO 16 true
etc.?

STeven.
Fraser from United Kingdom  [5 posts] 5 years
Yea I was planning on changing the DIO lines as you describe.
Anonymous 5 years
Use VBscript to translate nearest color into values for the DIO lines by via  variables. Then specify those variables in the Arduino module.

See attached.

STeven.

program.robo

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