> For the complete documentation index, see [llms.txt](https://felienne.gitbook.io/codasium/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://felienne.gitbook.io/codasium/module-3.5-arduino/les-2/les-2b.md).

# Les 2b

**Opdracht 1) Maak een spaceship**

Maak het circuit met led lampjes en een knop om een spaceship te maken (zie boek bldzd 34)

**Opdracht 2) Installeer de Arduino IDE**

Zie presentatie

**Opdracht 3) Programmeer je Arduino**

Schrijf de code om je spaceship circuit van opdracht 1 aan te sturen. Stuur de code naar de Arduino en check of deze werkt. Dit is uitgelegd in het boek bldzd 36 t/m 40.

**Opdracht 4) Spice up your shapeship**

Vouw het bijgeleverde karton en plaats dit over je circuit zodat je een echt spaceship hebt.

**Opdracht 5) Leg uit**

Leg in eigen woorden uit:

* Wat doen de `loop()` en de `setup()` functies?
* Wat doet de `pinMode()` functie?
* Welke input geef je mee aan de functie `digitalWrite()`?
* Welke output geeft de functie `digitalRead()`?

**Opdracht 6) Initialise**

Zorg ervoor dat alle led lampen 1 keer knipperen als je de code van de computer naar de Arduino stuurt.

**Opdracht 7) Langzaam spaceship**

Zorg ervoor dat alles 10 keer zo langzaam gaat. Dus 1x knipperen duurt 10 keer zo lang dan eerst.

**Opdracht 8) Serie schakelen en Lampje toevoegen**

Voeg een extra lampje toe en een tweede knop. maar zorg dat de knoppen in serie zijn geschakeld.

**Opdracht 9) Geel! (X)**

Vervang één van de rode led lampen door een gele. Bedenk zelf wanneer deze moet knipperen.

**Opdracht 10) Fantasie (X)**

Bedenk zelf iets om je schip uit te breiden. Dit kan zowel door het toevoegen van onderdelen aan je circuit als door het aanpassen van de code.


---

# 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, and the optional `goal` query parameter:

```
GET https://felienne.gitbook.io/codasium/module-3.5-arduino/les-2/les-2b.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
