Code

Operating Instructions

The Arduino code has two parts, the startup routine and the run loop. To start the machine, the operator ensures that both arms are in the down position (the cams should be vertical). The motors are then energized by turning on the high voltage switch.

Next, the Arduino is powered on by turning on the low voltage switch. The Arduino goes through the startup routine, then the run routine.

The complete code (hosted by Github).

Startup Routine

In the startup routine, the arms move from the down position into the catching position.

Run Routine

This is the run routine. This is the code in psudocode:

  • if the left arm is almost done, move the right arm
  • if the right arm is almost done, move the left arm
  • if the left arm is moving, turn the left LED light on
  • if the right arm is moving, turn the right LED light on