Kicker Chipper board

As the name suggests, the function of this board is to kick and chip.

To make this happen it cycles through the following states:

  • off charging is off. If the capacitors are still charged it is able to shoot
  • ready capacitor is charged. As the capacitor drains over time it starts charging again after if one of the following conditions is reached
    • Capacitor voltage can be read and voltage is lower than 220V
    • Capacitor voltage cannot be read and 15 seconds have passed
  • charging charge until done
  • shoot state right after shooting. kick and chip pins are set to off and state will be changed to off or charging.

The state can go from off or ready to shoot by the function shoot_shoot(). This function also calculates the shooting time. How longer this time is, how harder the ball is kicked. To get the desired speed the speed needs to be converted shooting time. The recommended method of doing this is manually setting a kickTime in the function claculateShootingTime(), send a kick command via basestation or OLED screen, and checking with vision how fast it goes. Do this for multiple kickTimes and plot it against the speeds recorded. Find the function that (roughly) fits the points plotted and put that in the code.