The Dribbler board has 2 functions, grab/catch the ball with the dribbler and detect if it has the ball via a blinking Infrared LED.
Following the main function, the first function that gets executed is the init() function in the dribbler_board.c. This function will initialize the peripherals, dribbler and ballsensor, followed by initializing the CAN bus. Once these are initialized, the board then loops over checking if a command over CAN bus has arrived and if the dribbler has the ball.
Here we give a short overview of all the files and task they are part of.
dribbler_board.c
contains all the loops and calls to functions for initialize, MCP and callbacks.ballSensor.c
everything related to the ballsensor, in particular the IR LED and IR receiver.dribbler.c
everything related to the motor that spins the dribbler, with related functions for the motor drivertim_util.c
all timers that are used as well as timers related to PWM, defined in the header versiongpio_util.c
this is currently for LED's, two normal LED's and an IR LEDAC_DC_util.h
pins related to analog and digital conversion, no functions are defined only for defining identifiers related to these pinsperipheral_util.h
here we define the identifier for the UART pinlogging.c
everything related to UART communication between robot and laptop