
1
Although the actuator will automatically
stop when it gets to the end of its travel,
this crushTime period (30 seconds for
my motor) sets how long the motor
should be on, before reversing.
2
The setup function controls the whole
operation of the project. After setting
both control pins to be outputs, it
immediately starts the crushing action
using the crush function.
4. SMASH CANS!
Push the Reset button on the Arduino
to trigger the crushing action (Figure
C
). Whenever the Arduino resets, it
automatically starts to move the linear
actuator. Smoosh!
GOING FURTHER
H-bridges can be used to control other
types of motors, including stepper motors. ...