Contains the main finite state machine for Lab 0x03. More...
Classes | |
| class | main.State |
| A class to hold the current state of the FSM. More... | |
Functions | |
| def | main.main () |
| Entry point for the Reaction Timing test lab. More... | |
| def | main.generate (time_s, data) |
| Generate a CSV entry to send to the front end of the format "time, counts". | |
Variables | |
| main.A0 = ADC(Pin.cpu.A0) | |
| Global A0 object for ADC counting. | |
| string | main.START_DATA_COLLECTION = "START_DATA_COLLECTION\n".encode("ascii") |
| Define a constant for data collection start. | |
| string | main.STOP_DATA_COLLECTION = "STOP_DATA_COLLECTION\n".encode("ascii") |
| Define a constant for data collection stop. | |
| int | main.BUFF_SIZE = 5000 |
| Define a constant buffer size (number of data points) | |
| int | main.SAMPLE_PERIOD = 10 |
| Define a constant period in microseconds (time between data points) | |
| int | main.LOWER_THRESHOLD = 10 |
| Any ADC reading below this is considered LOW. | |
| int | main.UPPER_THRESHOLD = 4000 |
| Any ADC reading below this is considered HIGH. | |
Contains the main finite state machine for Lab 0x03.