Demonstrates analog input by reading an analog sensor and turning on and off a light emitting diode (LED) at a rate determined by the analog sensor reading.
What you’ll learn
In this example, you’ll learn how to:
- Stop a sketch that is running
- Set up a serial monitor
- Read analog input data from a sensor
- Use the analog input to control a digital output
You’ll use the serial monitor to see the raw data coming from the sensor. You’ll be able to control the rate of an LED blinking using the input from a rotary angle sensor.
Gather your materials
You’ll need the following to complete this tutorial: