Final Project: Completed Code

I have finally completed the code to run my ‘Rita Shaker’. I took the sweep program provided as an example with the Arduino software and modified it.

I modified it to include a second servo. Initially I ran into some issues because of the manner in which I mounted the servo motors to the base. They are oriented in opposite directions, which resulted them moving in opposite directions when I ran my initial code. I solved this by telling the Rservo to move to a position that equaled 180 degrees minus the position of the Lservo. I also restricted the movement of the arms from 62 degrees to 167 degrees. This helped to prevent the arms from ramming the shaker into the base. I also experimented with increasing the speed of the movement by decreasing the amount of delay between movements. This worked well but when I tested out the ‘Rita Shaker’ while filled, the body of the Lservo cracked slightly. This necessitated reinforcing them by anchoring them with bungee cords.