All exercises
5. Serial monitor
Send numbers through the monitor to control the LED brightness.
Task
- 1.Run the program: the monitor shows “Ready”.
- 2.Send a number from 0 to 255 and watch the LED on D9.
- 3.Print the potentiometer value to the monitor every second.
Code
Tab inserts two spaces. To leave the editor press Esc, then Tab.
Virtual stand
Program not started
| Pin | Part | State |
|---|---|---|
| USB | Serial monitor | 9600 |
| D9 | Red LED | off |
Serial monitor 9600
The program has not sent anything over Serial yet.