Overview
This is my Reaction Test Game using Producer-Consumer architecture. The example uses queues and records the time using the Tick Count (ms) function. The program is fairly basic but allows the user to see their reaction time.
Description
Firstly the program initialises the Start Button and Colour box. After this a queue is created, containing a cluster of two elements, the next state and the tick count (ms).
The game starts when you click the start button. At this point, the next state is added, and a random time is generated (1-5 seconds).
The state machine then waits this random time, before chaning the colour of the colour box. Once the colour has been changed, the tick count is recorded.
As soon as the space bar is pressed, a new event (and state is generated) and the tick count is recorded again.
The program then changes to the "Results" state where the total time in ms is calculated (Final tickcount - Start tick count). This is then presented to the player.
Steps to Implement or Execute Code
1) Download the project
2) Open React_Main.vi
3) Run the VI.
4) Instructions are shown in dialog box
Requirements
Software
LabVIEW 8.6 or newer
Hardware
Keyboard!