LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need help with array leds

You got a working draft version earlier. What else do you need?

 

Once you fully understand the code and the purpose of all four cases, you could try to come up with ideas to improve it.

 

Here is a quick cleanup of Lewis's version, eliminating some of the duplicate code that I mentioned earlier. Maybe it is now easier to understand. The original also had one too many iterations. (The typedef is still the same)

 

As I said, it is possible to create a solution without the use of any case structures.

That would be a good exercise! See how far you get 😄

 

 

0 Kudos
Message 21 of 29
(1,961 Views)

And here's a hint to use some of the inherent symmetry in the directions. 😄

0 Kudos
Message 22 of 29
(1,956 Views)

Thank you!!

 

I´ll try to modify the code to add more things and I´ll send you for suggestions. 🙂

0 Kudos
Message 23 of 29
(1,948 Views)

I like the mods.  I will hopefully spot things like that in future.

 

Thanks for the code reviewSmiley Happy

Lewis Gear CLA
LabVIEW UAV

0 Kudos
Message 24 of 29
(1,910 Views)

Just for a very different perspective, an interesting solution involves complex numbers. It always helps to think outside the box. 😄

 

It is useful to know that a multiplication of complex numbers corresponds to a rotation.

 

(Less code overall! No case structures! Only a single instance of "replace array subset"! 121 iterations on the FOR loop!, etc.)

 

Remember, your teacher also reads these forums, so I would not use this directly, but maybe you could use some of the (non-complex) ideas in your solution. You could try to implement something similar without using complex numbers.

 

 

 

 

Download All
Message 25 of 29
(1,891 Views)

@altenbach wrote:

Just for a very different perspective, an interesting solution involves complex numbers. It always helps to think outside the box. 😄

 

It is useful to know that a multiplication of complex numbers corresponds to a rotation.

 

(Less code overall! No case structures! Only a single instance of "replace array subset"! 121 iterations on the FOR loop!, etc.)

 

Remember, your teacher also reads these forums, so I would not use this directly, but maybe you could use some of the (non-complex) ideas in your solution. You could try to implement something similar without using complex numbers.

 

 

 

 


interesting code....good job!   Smiley Happy

Message 26 of 29
(1,883 Views)

That is the best VI I have ever seen!

0 Kudos
Message 27 of 29
(1,858 Views)

@altenbach wrote:

Just for a very different perspective, an interesting solution involves complex numbers. It always helps to think outside the box. 😄

 

(...)

 


Awesome! Smiley Very Happy

 

Br,

 

/Roger

 

0 Kudos
Message 28 of 29
(1,831 Views)

Thank you very much. I know that my tecaher can see this forum, I´ll change somethings in code.

😄

0 Kudos
Message 29 of 29
(1,812 Views)