API
go_wait()
Generate random wait time before light out.
Returns:
| Type | Description |
|---|---|
int
|
Random wait time between 2000-3000ms |
Source code in startsignal.py
10 11 12 13 14 15 16 17 | |
light_up(column)
Light up LEDs in specified column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
column
|
int
|
Column index (0-4) |
required |
Source code in startsignal.py
38 39 40 41 42 43 44 45 46 47 | |
run_game()
Run one game cycle.
Returns:
| Type | Description |
|---|---|
int
|
Reaction time in ms, or negative value if a jump start detected. |
Source code in startsignal.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
start_sequence()
Execute the start light sequence.
Returns:
| Type | Description |
|---|---|
bool
|
False if jump start detected, True otherwise |
Source code in startsignal.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
wait_for(duration)
Wait for duration(ms) time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
duration
|
int
|
Wait time(ms) |
required |
Returns:
| Type | Description |
|---|---|
bool
|
False if jump start detected, True otherwise |
Source code in startsignal.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | |