# Oppgave 10: Starte og stoppe animasjon via radio

I dette eksempelet vil senderen stoppe animasjonen på mottakeren ved trykk på A-knappen. Ved trykk på B-knappen starter den.

### Program: Sender

{% embed url="<https://makecode.microbit.org/_U8DJFJ12iWmo>" %}

### Program: Mottaker

{% embed url="<https://makecode.microbit.org/_dTPDLtXYmYmz>" %}

* Start med å lage variabelen "on"
* "on" er en såkalt boolsk variabel som kun kan ha to verdier: 0 eller 1
* Hvis "on" = 0 er animasjonen stoppet
* Hvis "on" = 1 kjører animasjonen
* Husk at "receivedNumber" skal trekkes ned fra "når radio mottar" blokken i "sett on til..."

### Prøv selv

1. Sjekk at programmene fungerer som forventet
2. Endre i programmene slik at det vises en annen animasjon hvis man trykker på A+B på senderen


---

# 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://oppgaver.n00b.no/micro-bit/kom-i-gang-med-micro-bit/oppgave-10-starte-og-stoppe-animasjon-via-radio.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.
