A photoresistor is an electronic component designed to measure light intensity. It is a type of resistor whose value varies depending on the amount of light it receives. The photoresistor is commonly used in projects involving light detection, such as a darkness detector, which could turn on an LED when a certain light threshold is reached, or in a solar tracker to optimize the orientation of photovoltaic panels.Other types of sensors can also detect light and convert it into electrical signals, such as the photodiode or phototransistor. Here is the schematic on Raspberry Pi Pico to make the photoresistor work: // Define the ADC pin const int ldrPin = A0; // ADC0 is pin A0 on the Raspberry Pi Pico void setup() { // Initialize serial communication to display results Serial.begin(9600); // Configure the LDR pin as input (it is input by default) } void loop() { // Read the analog value from the photoresistor (LDR) int ldrValue = analogRead(ldrPin); // Display the value read in the serial monitor Serial.print("LDR Value: "); Serial.println(ldrValue); // Wait a bit before the next reading delay(1000); // 1-second delay }