HW8 – State machine
I used a servo motor, IR sensor and switch to create a machine that takes an object and throws it over a table.
State 1 waits for an object to trigger the IR sensor and moves the servo to load an object.
State 2 waits for a switch and throws the object.
State 3 waits 3 seconds then returns the servo to its State 1 position.
Arduino Sketch: HW8