Activity and Motion
Using the accelerometer
We are going to use a variables to create a jump counter. The variables are created by the programmer and will store the number of times the system senses a jump using the accelerometer
When A Button is pressed
score = 0
//create the new variable score
The accelerometer is an electro-magnetic device that can sense motion or vibrations - everytime it senses motion we want to increase the score by 1. So the input is the shake of the accelerometer
On Shake
set score = score + 1
Now add some customization:
Last updated