LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

blink(toggle) pwm controlled led on arduino

andanother one I tried for blinking diodes

0 Kudos
Message 11 of 14
(1,161 Views)

Since you don't seem to "get it", I'll show you in pictures what I'm trying to suggest.  Here is a For Loop that runs 16 times, one for each Diode.  The numbers that you need to send to Arduino to turn each diode on are saved as a constant array which is indexed by the For loop to bring them in one at a time.  In addition, there's a U16 initialized to 1 that is fed into a Diode Array (16 Booleans), replacing your 16 Booleans with 1 Array of Booleans.  Each time through the loop this gets left-shifted once, so the Diode Array will have successive Diodes "turn on".  Inside the loop is code you need to write that handles turning on/off the particular identified Arduino LED (note that this probably also needs to be a For loop, as you need to turn the LED on and off.  If you want tlash it more than once, you'll need more For loop states.

LED Loop.png

Bob Schor

0 Kudos
Message 12 of 14
(1,139 Views)

Thanks

🙂

This is a good idea, I will surely try it and will let you know about my outcomes shortly 🙂

0 Kudos
Message 13 of 14
(1,123 Views)

Hello

Thankyou for your post I was able to implement this but I am facing one problem. How can I visualize which laser diode is on by any means on User Interface, This boolean array doesnot work in this case because it only shows the number converted in boolean so it is not lighting up in increment manner, and even I can not wire 2D array with this wire

0 Kudos
Message 14 of 14
(1,093 Views)