01-26-2014 10:05 AM
Hi guys,
Basically what I want, is when I push the okay button. The corresponding led in the array drops down and stays on true. So when I push the okay button again on the right time, in the same row a led drops down and stacks up.
The idea was to make a little game, some sort of 4 in a row. With two players and a timer, so you have to stack 4 ASAP to get points.
Maybe you guys can help me where to find information. Or take a look at my VI i dont think its very difficult. But for me it is lol.
Thanks a lot guys.
01-26-2014 11:13 AM
You've done a great job telling use what you want, but how about letting us know where you are stuck. This will allow us to give you the correct advice.
01-26-2014 11:20 AM
You have an incredible amount of duplicate code: sequence frames that only differ in the value of a single boolean. Have a look at a state machine instead. Try to use a single 2D array, where you simply flash top top row in sequence until OK is pressed.
01-26-2014 11:04 PM
Hi, Futurebound,
I tried it by my thought, and I'm not sure if it is what you want.
You can simplified the running LED by RadioButton, it can remove some controls and local variables.
All thing left is just how to manipulate the LED array, I use Insert Into Array.vi to get it accumulating or stacking.
Hope it helps.
01-27-2014 05:08 AM
Thanks, i dont know a lot about arrays jet so im looking in to it now. I wil also look in to state machines as you call it. I followed one class in Labview two years ago and it wasnt that helpfull at all.
01-27-2014 05:10 AM
Thanks a lot for the VI, this looks like what i want. Now i just have to figure out how to give points when theres four in a row! .
01-27-2014 06:30 PM
Maybe this old post can give you some ideas for the dropping code. 😄 Seems a bit simpler.