|
| state |
| The current state of the finite state machine.
|
|
| round |
| Counts the number of runs of our task.
|
|
| wins |
| Number of Wins.
|
|
| losses |
| Number of Losses.
|
|
| press |
| Global State of button not being pressed.
|
|
| button_press |
| Global Button initialized as not being pushed.
|
|
| buttonStart |
| record start time (ms) each time button is pushed
|
|
| buttonEnd |
| Record end time (ms) when button is released.
|
|
| DBG_flag |
| Flag to specify if debug messages print.
|
|
| ledOn |
| the time choices (sec) when the led will be on
|
|
| ledOff |
| the time choices(sec) when the led will be off
|
|
| modeOn |
| number of items in sequence when LED is on
|
|
| modeOff |
| number of pauses in sequence when LED if off
|
|
| i |
| indexing value for the list of LED times
|
|
| game |
| Game set to start when it enters State 1.
|
|
| pinA5 |
| Connect to pinA5 to control LD2 LED.
|
|
| tim2 |
| create object using timer 2, trigger at 20000 hz (cycle/sec)
|
|
| t2ch1 |
|
| pinC13 |
| Define pin object for PC13 - for blue user button.
|
|
| ButtonInt |
| Associate the callback function with the pin by setting up an external interrupt.
|
|
| start |
| start time recording More...
|
|
| onList |
| randomize list when LED is on
|
|
| offList |
| randomize list when LED is off
|
|
| now |
| time passing after button is released
|
|
| duration |
| time difference between start of code and current state
|
|
| onTime |
| set the on time for this round
|
|
| offTime |
| set the off time for this round
|
|
| curr_time |
| current time is updating constantly for LED on
|
|
| notPress |
| time difference of button not being pressed
|
|
| releaseTime |
| record time when button is pushed
|
|
| pressDuration |
| time difference between release time and button push
|
|
| offCurr |
| time recording starts when led is off
|
|
| offDuration |
| time duration when LED is off
|
|
| Choice |
| User input to continue or quit game.
|
|
| randList |
| empty list to append new items into
|
|
| List |
| inputted list of time items for LED to turn on and off
|
|
| k |
| length of list
|
|
| randNum |
| randomly select item location
|
|