Related to this topic is a VPython-Arduino project by one of my students, Laura Lee, a few years ago. She attached an Arduino to a small, level breadboard and wired an accelerometer to the Arduino. VPython communicated with Arduino to get the output of the accelerometer. VPython converted this to tilt angle (pitch and roll, in aeronautic terms) of the breadboard. Then in VPython, a ball rolled on a table that could be tilted (in 2-D) by tilting the breadboard/Arduino.
The project is posted at:
Her poster presented at a NCS-AAPT meeting is posted at:
It has photos of the device.
I have to admit that the physics in the VPython program is not quite right. While tilting the board, the VPython code basically “glues” the ball to the board, tilts the board along two axes (pitch and roll), and moves the ball according to the new angle for a small time interval dt. For small angular accelerations of the board, it seems to work well. However, it’s impossible to “throw” the ball by quickly tilting the board, which you can do in real life.
I’ve wanted to analyze the program in greater detail and get the program correct, in case anyone is interested in a collaboration. I just haven’t devoted time to it since my student finished the project.
Note that Bruce Sherwood provided valuable advice in getting the rotations correct in the VPython program. In the poster, my student acknowledged his help.
AT