Robotics & Arduino
Lesson 2 · Refinement

Do It Yourself.

Build a circuit with a potentiometer.

Print out the reading in the Serial Monitor.
Turn the knob. See how the reading changes.

Optional A — Circuit only

Add an LED.
Use the potentiometer to control its brightness.

Keep a fixed current-limiting resistor in series with the LED.

Optional B — Code it in blocks

Add 3 LEDs: red, orange, green.
Measure the reading.
Light the LEDs according to the reading.

DECLARE · INIT · RUN · LOGIC
Use a separate series resistor for each LED.