From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simon game

Hi I'm creating the simon game code in labview but I have 3 problems that I haven't solved yet:

1. When two colors will come repeated in the sequence the lights not blink. For example: Red,yellow, blue, blue..., blue color just blink once. Somebody know how to correct this?. 

2. And the second is how to create a boton to start and stop the game when the user wants? 

 

Thanks for your suggestions

 

I attached my code. 

0 Kudos
Message 1 of 2
(950 Views)

Go back to the tutorials and look at the shipping examples and design templates. (maybe even search the forum).

 

  • All you need is a simple state machine.
  • One outer while loop, one case structure, and a few shift registers to carry state data.
  • You don't need any local variables.
  • You don't need any sequence structures.
  • You don't need any event structure (an event structure hidden deep inside sequence frames and even a FOR loop is a really bad idea!)
  • Your arrays should be integers.
  • Done right, the final code should easily fit on a postcard.
0 Kudos
Message 2 of 2
(912 Views)