# Oppgave 12: Stoppeklokke

I dette eksempelet startes tidsmålingen ved trykk på A og stoppes ved trykk på B. Den målte tiden i sekunder vises ved trykk på A+B.

### Program

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

* Husk å opprette tre variabler: "starttid", "sluttid" og "tid"

### Prøv selv

1. Sjekk stoppeklokka sin nøyaktighet med en "ekte" stoppeklokke (du oppdager forhåpentligvis at den måler temmelig nøyaktig)

### Utfordring 1: Eggklokke

Programmer en eggklokke som slår alarm etter 10 minutter

### Utfordring 2: Stoppeklokke med fjernstyrt start og stopp

Bruk to micro:bits. Den ene fungerer som sender, mens den andre er selve stoppeklokken. Ved trykk på A-knappen på sendere startes stoppeklokken og ved trykk på B-knappen stoppes den.

* Hvor kan man bruke en stoppeklokke som dette?


---

# 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-12-stoppeklokke.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.
