> For the complete documentation index, see [llms.txt](https://oppgaver.n00b.no/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://oppgaver.n00b.no/micro-bit/bit-bot/start-motorene.md).

# 1. Kjør frem og tilbake

Først skal vi teste bit:botens fart når den kjører fremover og rygger. Ved trykk på A-knappen skal den kjøre fremover, og ved trykk på B-knappen bakover.

### Program

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

* Farten kan være fra 0 til 1023, der 0 betyr STOP og 1023 er størst fart
* Hvis farten er negativ kjører motoren baklengs
* Så lenge micro:biten holder pause kjører bit:botens motorer med farten du har valgt

### Prøv selv

1. Prøv å måle hvor langt bit:boten kjører fremover og bakover. Er strekningene like?
2. Hvis ikke; hvordan kan tallstørrelsene endres slik at strekningene blir like?

### Utfordringer

1. Prøv å kjøre med forskjellige hastigheter - lav og høy. Gjennomfør en rekke forsøk med stigende hastigheter og noter hvor langt bit:boten kjører fremover og bakover ved forskjellige hastigheter.
2. Få bit:boten til å kjøre en bestemt strekning. For eksempel 1,5 meter.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/bit-bot/start-motorene.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.
