|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Programming Blinking LEDs?
We are trying to add some "bling" to our robot. We have added red and blue LED strips on our robot. The LED strips are connected to their own relays. We can program them to turn on, but we would like to get them to alternate between the red and blue colors every 3 seconds to create a blinking affect.
How do we program them to blink? Can we get them to blink even when the robot is disabled? Is their another approach we should try? |
|
#2
|
|||||
|
|||||
|
Re: Programming Blinking LEDs?
Here are some variations to alternate Relays between on and off.
There are further variations that turn everything on at once and everything off. These loops would go only in Periodic Tasks.vi.
If you want them to blink while disabled, then you'd need a custom circuit that does the blinking for you as long as it gets power. Last edited by Mark McLeod : 22-08-2011 at 13:14. |
|
#3
|
||||
|
||||
|
Re: Programming Blinking LEDs?
I found a circuit that uses a 555 timer to turn on for 0-10 seconds and off for 0-100 seconds (It's called a programmable timer in the book, but the timing is actually adjusted by potentiometers and by using different capacitors). Circuits such as this are not hard to find schematics for and allow you to achieve the desired result without messing around with, and possibly slowing down your code. (also, they will continue to blink when the robot is disabled.
Edit: Here is a good reference to use when designing 555 based timers: http://www.kpsec.freeuk.com/555timer.htm#astable Last edited by PAR_WIG1350 : 22-08-2011 at 13:43. |
|
#4
|
||||
|
||||
|
Re: Programming Blinking LEDs?
This is a little routine we built last year, to play "TORC RULES" in Morse code during autonomous mode.
When you get the arrays set, remember to use the "Make default data" to remember the arrays, or you may be doing them a couple of times. Good Luck, Scott. |
|
#5
|
||||
|
||||
|
Re: Programming Blinking LEDs?
I'm not positive that this is allowed but I think it warrants the suggestion. You may want to consider using a custom circuit for your led stripping. Because it is a nonfunctional decoration, it is free game for circuits. Instead of using relays, maybe you might consider MOSFET transistors combined with an arduino control board. This way you can limit the workload on the crio, have the LEDs blink in disabled mode, and you can still change the pattern using a serial link to the crio.
|
|
#6
|
||||
|
||||
|
Re: Programming Blinking LEDs?
Wildstang did that last year. Great effect. http://www.chiefdelphi.com/forums/sh...threadid=96854
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|