Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   LEDs on the REV RIODuino (http://www.chiefdelphi.com/forums/showthread.php?t=133845)

Asymons 01-02-2015 17:33

LEDs on the REV RIODuino
 
Hi Everyone,

I have a question in regards to programming the LEDs on a REV RIODuino. Would it be possible to program the micro-controller board to light LED's by response of a Joystick Command (like pulling the trigger)? Or would it be more practical to lets say have the LEDs function through particular commands on the robot? The goal of this is to have LED's as a mechanism to not only look pretty, but to help human players know when to load a tote into the robot (Green being ready, red being not ready ). Thank you for any help!

dyanoshak 03-02-2015 00:14

Re: LEDs on the REV RIODuino
 
Quote:

Originally Posted by Asymons (Post 1437064)
Hi Everyone,

I have a question in regards to programming the LEDs on a REV RIODuino. Would it be possible to program the micro-controller board to light LED's by response of a Joystick Command (like pulling the trigger)? Or would it be more practical to lets say have the LEDs function through particular commands on the robot? The goal of this is to have LED's as a mechanism to not only look pretty, but to help human players know when to load a tote into the robot (Green being ready, red being not ready ). Thank you for any help!

Hey Asymons,

Both scenarios are quite practical.

First you should set up a way to communicate between the roboRIO and the RIOduino. There are many options, but I2C and Serial (UART) connections are already made between the two when the RIOduino is plugged into the MXP.

You'll then write code on your RIOduino that responds to commands or signals from your roboRIO.

Those commands can be simple: when the RIOduino gets the "red" command, it changes the LEDs to red, when it gets "off" it turns them off, etc.

They can also be more complex: the roboRIO sends the current robot state, and the RIOduino decides what to do.

The code on the roboRIO will need to take input (joystick values, sensor values, and/or robot state) and decide what command to send to the RIOduino.

AndyMark published an example using the RIOduino with a touch screen shield. Look at the "Files & Documents" tab on the RIOduino with 2.8" Touchscreen (am-2999) bundle page.

Take a look at that example to see how they communicate between the roboRIO and the RIOduino. With some modification, you can send commands to your RIOduino LED code rather than the RIOduino touch screen code.

-David


All times are GMT -5. The time now is 23:31.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi