Sphero Post Mortem – Joe Simon and David Moss
For our final project we created a golf game where the user creates a course and then swings their phone like a golf club to move Sphero to complete the course. At the end the users score is tallied and displayed.
To get the Sphero to move we use the the accelerometer in your phone to figure out how fast to move the Sphero. We used the linear accelerometer because in our case we did not want to have gravity applied to force. In our testing of the accelerometer we discovered that a light swing registered 3 and a hard swing registered in the mid 20s. Since the Sphero drive command only accepts values between 0 and 1, we divided the force by 10 to get it in the right range and to make the game feel natural to play. We also only registered values above 3 because anything lower would cause the backswing to make Sphero move.
One problem we had was with the Sphero documentation for the Calibration view. The documentation on their GitHub page gave the wrong package name for the CalibrationView class. We ended up looking through the jar file to find the actual package name.
The only research we had to do was look at Android documentation for the accelerometer and the Parceble class.
Here is the screen where you create the course