LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hi everyone ,How can I continue my code, I would like to get a triangel with leds, Thank you.

You can use nested FOR loop (outer loop is indexing rows, inner columns). Turn The led ON when the row index is greater than or equal to the column index.

 

Ben64

0 Kudos
Message 2 of 12
(2,944 Views)
  • 2D arrays of LEDs are always square, never triangular.
  • Do you want to create a shape of a trinagle on a background of LEDs with the opposite state?
  • Do you want an outlined or a filled triangle?
  • What shape should it be (equilatenal-, right-, pointing up or down, etc.)?
  • How big?

 

(And please attach the actual VI. Pictures are pretty useless)

0 Kudos
Message 3 of 12
(2,939 Views)

Here's a triangle. Good enough? (Note that you can even simplify it (bottom), but it is typically recommended to initialize the final size and operate on a fixed size array (top).

 

 

 

(There are many ways to do this. I am also intentionally only attaching a picture because I don't know your LabVIEW version and recreating the code by yourself is a good beginner exercise :D)

 

0 Kudos
Message 4 of 12
(2,934 Views)

IN 5*5 leds array and up to diagonal

0 Kudos
Message 5 of 12
(2,916 Views)

Thaaank you very much

0 Kudos
Message 6 of 12
(2,914 Views)

@Nare wrote:

IN 5*5 leds array and up to diagonal


When asking question, make sure to give all requirements. For example we also don't know if the diagonal should be included or excluded.

 

In this case, just change the numeric diagram constant to five.

0 Kudos
Message 7 of 12
(2,906 Views)

Oh yes you are right,  however thank you 

0 Kudos
Message 8 of 12
(2,903 Views)

Sorry, Can you say me How can I write this code,how can I write this letter, please

0 Kudos
Message 9 of 12
(2,894 Views)

@Nare wrote:

Sorry, Can you say me How can I write this code,how can I write this letter, please


Well, start with the 2D boolean array initialized with all FALSE, then replace some with true using "replace array subset" given the indices.

You could also just turn the array into a control and change the values manually.

0 Kudos
Message 10 of 12
(2,879 Views)