LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array of LEDs

Hi, i have a problem with my project. I need to create an array of Leds with 20 lines and 40 columns which must be configurable. The interface must contain some buttons that will define a pattern : second row active, every second row active, only the middle led active, and the 4 corners active. The photo is just a reference so i need to do something a little different but the program need to do the same thing.

Untitled.png

 

0 Kudos
Message 1 of 10
(1,819 Views)

So what's your problem?  You've stated what your VI is supposed to do, but you fail to state where you got stuck.  Supply your attempt and we can help you work through it.  We are not here to do your work for you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 10
(1,800 Views)

@9Anonim9 wrote:

Hi, i have a problem with my project. I need to create an array of Leds with 20 lines and 40 columns which must be configurable. The interface must contain some buttons that will define a pattern : second row active, every second row active, only the middle led active, and the 4 corners active. The photo is just a reference so i need to do something a little different but the program need to do the same thing.

 


So basically you need a button (or buttons) to select and load predefined patterns into a Boolean array.

What part are you stuck on?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 10
(1,772 Views)

If the patterns can be described in  a few words, there is probably an algorithm to generate them with a few primitives'.

 

If you don't want to figure this out, just create a 3D array constant where each plane is one of your desired 20x40 patterns and you index into it based on the pressed button. Instead of all these separate buttons, consider a radiobutton containing all choices and wired it to the index. Keep it simple!  (Even here you could create this lookup table at program start (or even compile time) with a little bit of code)

 

Sorry, I misread. You seem to want to combine multiple buttons, so just create a LUT for each button then OR the various 2D arrays.

Message 4 of 10
(1,761 Views)

Can you define "middle"? If there is an even number of elements, there is no "middle".

0 Kudos
Message 5 of 10
(1,757 Views)

See if this can give you some ideas. Modify as needed.

 

altenbach_0-1606086103924.png

 

Message 6 of 10
(1,748 Views)

I just used an Event structure to load predefined patterns in to the array when the corresponding  button is pressed and update the Array of LED's indicator on the time out using a shift register

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 10
(1,683 Views)

@RTSLVU wrote:

I just used an Event structure to load predefined patterns in to the array when the corresponding  button is pressed and update the Array of LED's indicator on the time out using a shift register


This works for arrays of fixed size, but if the size also must be configurable, that will be tricky.

 

Note that the OP said:

 

"Hi, i have a problem with my project. I need to create an array of Leds with 20 lines and 40 columns which must be configurable. " 

 

My impression was that the size also needs to be configurable, especially since the given example image shows an array that is NOT 40x20. <shrug>.

0 Kudos
Message 8 of 10
(1,663 Views)

@altenbach wrote:

@RTSLVU wrote:

I just used an Event structure to load predefined patterns in to the array when the corresponding  button is pressed and update the Array of LED's indicator on the time out using a shift register


This works for arrays of fixed size, but if the size also must be configurable, that will be tricky.

 

Note that the OP said:

 

"Hi, i have a problem with my project. I need to create an array of Leds with 20 lines and 40 columns which must be configurable. " 

 

My impression was that the size also needs to be configurable, especially since the given example image shows an array that is NOT 40x20. <shrug>.


Well the OP was rather vague... An array of a given finite size that must be configurable?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 9 of 10
(1,660 Views)

It just means the size is NOT infinite. 😄

0 Kudos
Message 10 of 10
(1,644 Views)