Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Programming Blinking LEDs? (http://www.chiefdelphi.com/forums/showthread.php?t=97017)

grosh 21-08-2011 21:12

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?

Mark McLeod 22-08-2011 10:54

Re: Programming Blinking LEDs?
 
3 Attachment(s)
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.
  1. The first alternates between two cases and you can control the times of the blinks independently by passing in the delay time if you want.
  2. The second is another way to do the same thing without a Case statement. It only does one Relay, but you can add as many more as you want.
  3. The third wires two sets of LEDs to a single Relay and alternates between them
Relays only work while the robot is Enabled.
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.

PAR_WIG1350 22-08-2011 13:38

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

tr6scott 18-10-2011 08:46

Re: Programming Blinking LEDs?
 
1 Attachment(s)
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.

baronep 18-10-2011 22:30

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.

tr6scott 21-10-2011 06:11

Re: Programming Blinking LEDs?
 
Wildstang did that last year. Great effect. http://www.chiefdelphi.com/forums/sh...threadid=96854


All times are GMT -5. The time now is 09:24.

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