> For the complete documentation index, see [llms.txt](https://computational-thinking-in-room11.gitbook.io/room-112-dhs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://computational-thinking-in-room11.gitbook.io/room-112-dhs/software-development/activity-and-motion.md).

# 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`&#x20;

```
On Shake
   set score = score + 1
   
```

#### Now add some customization:

* [ ] When B Button is pressed display the score
* [ ] Create a `high score variable`&#x20;
  * [ ] Forever if score > high  score&#x20;
    * [ ] set `high score = score`
    * [ ] Display new high score on LED Grid

####
