This file contains a program which uses built in timer features of the STM32 MCU to testa a user's reaction time.
More...
|
|
| lab2b.count = None |
| | The timer count used to keep track of the IC.
|
| |
|
int | lab2b.comp = 0 |
| | The timer count used to keep track of the OC.
|
| |
|
| lab2b.timmy = pyb.Timer(2, prescaler = 8000, period = 0xffff) |
| | Initialization of Timer2 as a free running counter.
|
| |
|
| lab2b.pina5 = pyb.Pin (pyb.Pin.board.PA5, pyb.Pin.OUT_PP) |
| | Initialization of pin A5.
|
| |
|
| lab2b.pinb3 = pyb.Pin (pyb.Pin.board.PB3, pyb.Pin.IN) |
| | Initialization of pin B3.
|
| |
|
| lab2b.pinc13 = pyb.Pin (pyb.Pin.board.PC13, pyb.Pin.IN) |
| | Initialization of pin C13.
|
| |
| | lab2b.ch1 |
| | Initialization of timer channel 1. More...
|
| |
|
| lab2b.ch2 = timmy.channel(2, pyb.Timer.IC, pin = pinb3, polarity = pyb.Timer.FALLING) |
| | Initialization of timer channel 2.
|
| |
| list | lab2b.tries = [] |
| | Runs the program to test a user's reaction time. More...
|
| |
|
tuple | lab2b.rTime = (comp - count) % 65535 |
| | Computes the reaction time.
|
| |
This file contains a program which uses built in timer features of the STM32 MCU to testa a user's reaction time.