5 · Communication & data
Control the board from the keyboard
Intermediate18 min
Goal
Switch the LED on/off with the “on” and “off” commands.
Why it matters
Parsing a text command is already writing a protocol.
Steps
- 01Serial.begin(9600).
- 02Test Serial.available(), then read the line.
- 03Compare the received command and act on it.
- 04Send back an acknowledgement.
This tutorial runs inside the Circuitly simulator: your wiring and your code are checked automatically at every step.