HRI board firmware v2.1 Microcontroller firmware of the board used during the HRI labs.

Modules
Here is a list of all modules:

Main / Communication | Control the communication with the computer
Driver / ADC | Driver for the analog-to-digital peripheral of the STM32
Driver / Button | Driver to access a button
Driver / Callback timers | Driver to call functions at a fixed rate
Driver / DAC | Driver for the digital-to-analog converter
Driver / Debug GPIOs | Driver to control three GPIOs, to debug easily with an oscilloscope
Driver / Extension UART | Driver for the UART serial communication peripheral
Driver / External motorboard | Driver for an external motorboard
Driver / H-bridge | Driver for the H-bridge of the motor
Driver / Hall sensor | Driver for a Hall-effect angular sensor
Driver / I2C | Driver for the I2C bus communication peripheral
Driver / Incremental encoder | Driver for an incremental encoder
Driver / LED | Driver to control a LEDs row
Driver / MPU-6050 | Driver for the MPU-6050, a 6-axis IMU from Invensense
Driver / UART | Driver for the UART serial communication peripheral
Main / Haptic controller | Main haptic paddle controller
Lib / Basic filter | Basic iterative filter for smoothing
Lib / Circular buffer | Bytes queue (FIFO) implemented with a circular buffer
Lib / PID regulator | Proportionnal-integral-derivative regulator with integrator saturation capability
Lib / Utils | Utility functions and constants
Main / Torque Regulator | Sets the desired motor, by controlling the current