This project was completed for my ME30: Intro to Robotics class in order to explore the interface between software and hardware. The task was to build a playable game incorporated a micro controller, electromechanical movement, and user input. I chose to tackle this task with a stepper motor driven by custom made H-bridges and driver code. The game itself is unique twist on the classic "Simon" game, where the player must repeat the given sequence of shapes by stopping a rotating needle on the correct shape.
The construction of this game is comprised of laser-cut acrylic plates for the body, an Arduino Uno, a hall sensor and maget (for position calibration), two H-bridges, a stepper motor, and various electrical components to facilitate user input and control. To play the game, the player must first exit idle mode by selecting 1 or 2 player mode which is done by stopping the needle on the respective number. In 1 player mode, the computer initiates a sequence that the player must repeat. Upon failure, the game wiggles in disappointment and resets to idle mode. In 2 player mode, one player initiates the sequence and the second player repeats it. The second player then adds to the sequence, and the first player repeats it. The same failure mode exists for both forms of play.
The most challenging aspect of this project was the development of the stepper motor driver hardware and code. The H-bridges were completed as a project of their early on in this class, so I was able to directly implement them from the start. Because of how streamlined this rest of this project would be, I decided to challenge myself by creating my own driver code instead of using existing libraries. This involved many hours of research and testing before I was able to succesfully drive the stepper motor. Thanks to this work, I gained a deep understanding of how stepper motors function and how they can be most optimally used.