Your microcontroller board has both digital and analog signal capabilities. Some pins are analog, some are digital, and some are capable of both. Check the Pinouts page in this guide for details about your board.
Analog signals are different from digital signals in that they can be any voltage and can vary continuously and smoothly between voltages. An analog signal is like a dimmer switch on a light, whereas a digital signal is like a simple on/off switch.
Digital signals only can ever have two states, they are either are on (high logic level voltage like 3.3V) or off (low logic level voltage like 0V / ground).
By contrast, analog signals can be any voltage in-between on and off, such as 1.8V or 0.001V or 2.98V and so on.
Analog signals are continuous values which means they can be an infinite number of different voltages. Think of analog signals like a floating point or fractional number, they can smoothly transiting to any in-between value like 1.8V, 1.81V, 1.801V, 1.8001V, 1.80001V and so forth to infinity.
Many devices use analog signals, in particular sensors typically output an analog signal or voltage that varies based on something being sensed like light, heat, humidity, etc.
An analog-to-digital-converter, or ADC, is the key to reading analog signals and voltages with a microcontroller. An ADC is a device that reads the voltage of an analog signal and converts it into a digital, or numeric, value. The microcontroller can’t read analog signals directly, so the analog signal is first converted into a numeric value by the ADC.
The black line below shows a digital signal over time, and the red line shows the converted analog signal over the same amount of time.
Once that analog signal has been converted by the ADC, the microcontroller can use those digital values any way you like!
A light sensor (also known as a CdS cell, light-dependent resistor, or photoresistor) detects light. They change their resistive value (in ohms, Ω) depending on how much light shines into the photocell.
When a light sensor is exposed to more light, the resistance decreases. When it is exposed to less light, the resistance increases.
By using a light sensor wired in a specific way (as a voltage divider), we can turn resistance into voltage. That change is then read by your board's Analog-to-Digital converter and sent to Adafruit IO.
On the device page, click the New Component (or "+") button to open the component picker.
Under Pin Components, select the Light Sensor.
The name and pin for the light sensor on your board are automatically selected. The Period determines how frequently the light sensor's value will be checked and sent to Adafruit IO. Set it to check the light sensor value every 30 seconds.
Click Create Component.
The device page shows a new light sensor component. The value of this component will change every 30 seconds.
To test the light sensor, try covering the light sensor with a piece of paper. Navigate to the feed page by clicking the graph icon on the top right corner of the light sensor component.
On the light sensor feed page, you'll be able to observe a graph of the light sensor values as they change over time.