Go to Post [E]specially when Murphy is around (or at a robotics competition), reality tends to win over physics. - EricH [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-01-2015, 16:42
motherrussia motherrussia is offline
Registered User
FRC #3570
 
Join Date: Jan 2014
Location: Alma
Posts: 5
motherrussia is an unknown quantity at this point
Help with RGB Lighting on Robot

I have a few question regarding this. How would one add RGB lighting in the begin.vi? That is the simple question. The next question is, how would set the lights on a timer, or, more preferably, make the lights change colors based on field prompts. To explain myself, there has to be some kind of signal sent to the robot to distinguish between when the robot is idle and when it is functioning. How would I take advantage of this (if it exists and I am not just retarded) to make the RGB LED's change color?
  #2   Spotlight this post!  
Unread 07-01-2015, 18:14
VeqIR's Avatar
VeqIR VeqIR is offline
Registered User
AKA: Dave
FRC #4488 (ShockWave)
Team Role: Mentor
 
Join Date: Mar 2014
Rookie Year: 2005
Location: Hillsboro, OR
Posts: 29
VeqIR is on a distinguished road
Re: Help with RGB Lighting on Robot

This will depend entirely on which kind of RGB LEDs you choose. In the simplest form, an RGB LED is just a 4 terminal device (R, G, B and common/power). If you wish to control one LED, you'd need 3 digital I/Os.

I assume you want to do something more interesting, like use an individually-addressable RGB strip. This allows you to control the color of each pixel independently and you can do some cool stuff. We used these on our robot last year and they work pretty great:

https://learn.adafruit.com/adafruit-...guide/overview

The downside is that they require an Arduino to control the lights since they use a special PWM-style 1-wire interace with tight timing requirements. We used 4 digital I/Os from the cRIO to signal the Arduino when robot functions happened and then the Arduino code adjusted the light pattern it displayed to the light strips.

However, Adafruit recently released some nifty new strips that can be configured using SPI (an interface you have on your RoboRIO).

http://www.adafruit.com/products/2240

The complication here is that you'd need to program your own control code to display something interesting to your lights that will share processing time with your robot functions.

I'd recommend the Arduino-controlled approach since it greatly simplifies the firmware development effort since they are tons of examples online on how to program these strips.
  #3   Spotlight this post!  
Unread 07-01-2015, 20:43
motherrussia motherrussia is offline
Registered User
FRC #3570
 
Join Date: Jan 2014
Location: Alma
Posts: 5
motherrussia is an unknown quantity at this point
Re: Help with RGB Lighting on Robot

Cool, thanks for the ideas. I don't have much experience with Arduinos, so I have a couple of questions. Could we program the Arduino in Labview, if not, what language? And, does what would we use to power the Arduino?
  #4   Spotlight this post!  
Unread 07-01-2015, 20:52
Thad House Thad House is online now
Volunteer, WPILib Contributor
no team (Waiting for 2021)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Thousand Oaks, California
Posts: 1,094
Thad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond repute
Re: Help with RGB Lighting on Robot

Quote:
Originally Posted by motherrussia View Post
Cool, thanks for the ideas. I don't have much experience with Arduinos, so I have a couple of questions. Could we program the Arduino in Labview, if not, what language? And, does what would we use to power the Arduino?
The arduinos are programmed using C. Lots of documentation can be found all over the internet. A good place to start either the arduino website or AdaFruits learning system, which has alot of information on the RGB lights they sell and how to hook them up to an arduino. That was linked in the post above.

As for power, I think the easiest way to power an arduino this year is to just plug it straight into the USB ports on the RoboRIO. This will allow an easy communication method between the 2 devices, and makes it so you do not have to solder any wiring. Just be sure if you do this to NOT power the lights off of that power supply, and instead use a separate 12v to 5v converter to power the lights.
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.
  #5   Spotlight this post!  
Unread 08-01-2015, 07:20
motherrussia motherrussia is offline
Registered User
FRC #3570
 
Join Date: Jan 2014
Location: Alma
Posts: 5
motherrussia is an unknown quantity at this point
Re: Help with RGB Lighting on Robot

Quote:
Originally Posted by Thad House View Post
The arduinos are programmed using C. Lots of documentation can be found all over the internet. A good place to start either the arduino website or AdaFruits learning system, which has alot of information on the RGB lights they sell and how to hook them up to an arduino. That was linked in the post above.

As for power, I think the easiest way to power an arduino this year is to just plug it straight into the USB ports on the RoboRIO. This will allow an easy communication method between the 2 devices, and makes it so you do not have to solder any wiring. Just be sure if you do this to NOT power the lights off of that power supply, and instead use a separate 12v to 5v converter to power the lights.
Cool. Thanks for everything.
  #6   Spotlight this post!  
Unread 08-01-2015, 12:23
dyanoshak dyanoshak is offline
Registered User
AKA: David Yanoshak
FRC #2158 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Austin, TX
Posts: 189
dyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond repute
Re: Help with RGB Lighting on Robot

Quote:
Originally Posted by motherrussia View Post
Cool, thanks for the ideas. I don't have much experience with Arduinos, so I have a couple of questions. Could we program the Arduino in Labview, if not, what language? And, does what would we use to power the Arduino?
REV Robotics has the RIOduino, an Arduino-compatible board, that can plug directly into the MXP on the roboRIO.

The RIOduino operates exactly like an Arudino Uno R3 but with a few added features that tailor it to the roboRIO and an FRC robot. For example:
  • Three auto selecting power options: USB, MXP, or externally (e.g. VRM)
  • Place to attach RGB LED strips directly (with external power)
  • I2C and UART already connected to the roboRIO (for communication)

We tried to make it as easy as possible to connect an Arduino to the roboRIO so you could get right to programming it rather than figuring out how to connect it. The great thing is you can use the vast ecosystem of Arduino examples on the RIOduino and get something working very fast.

The RIOduino is an approved active MXP board and is available now at AndyMark. Take a look at the documentation on our website: www.revrobotics.com/product/rioduino for more info on its various features.

-David
__________________
David Yanoshak
Co-founder REV Robotics | www.revrobotics.com
  #7   Spotlight this post!  
Unread 08-01-2015, 14:24
KPSch KPSch is offline
Registered User
AKA: Ken Schenke
FRC #1987 (Broncobots)
Team Role: Mentor
 
Join Date: Mar 2013
Rookie Year: 2013
Location: Lee's Summit, MO USA
Posts: 38
KPSch is a name known to allKPSch is a name known to allKPSch is a name known to allKPSch is a name known to allKPSch is a name known to allKPSch is a name known to all
Re: Help with RGB Lighting on Robot

Our team used an Arduino and some individually-addressable RGB lights on last year's robot. We used some of the digital IO pins from the cRIO that told the Arduino which of the pre-programmed light patterns to run. The cRIO would also tell the Arduino our alliance color so the lights could display a red or blue pattern.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:44.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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