Session 2: Loops and conditionals
Show fish (5 min)
Recap previous session (10 min)
- all mentors take turns asking short questions about the previous session
Explain how to upload code (5 min) Vova
- Explain how code upload works
- Upload code from session 1
Using external libraries (10 min)
- Explain the idea of external libraries
- Create a new project
- Copy src and modules.h from our library
- #include "src/locoboard.h"
Using remote control (30 min)
- Show how to connect
- Explain API
- Explain conditionals
Task
- Use Serial to check which button was pressed
Connecting external output devices (20 min) Natasha
- Discuss the concept of input and output (quickly, we'll get back to this later)
- Show how to connect LEDs and buzzers
- Explain how to use resistors to limit current with LEDs
- Explain API
Task
- Beep when pressing on/off button
- Blink LED as many times as the button label says (digits)
Upload session code (10 min)
Feedback round (5 min)