# Activity and  Motion

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

####


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://computational-thinking-in-room11.gitbook.io/room-112-dhs/software-development/activity-and-motion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
