// Jeff Ritchie March 23 2026. Fab Academy week 9- input devices // I am using this sketch with two different sensors- TP1521 B and C. B doesn't read visible light as much as C. int sensorPin = D3; // D3 is also A3 on the pinout- its an analog input pin to read the data from the sensor int sensorValue = 0; // sensor variable to store the value coming from the sensor void setup() { Serial.begin(115200); // initializes serial communications at 9600 } void loop() { pinMode(sensorPin, INPUT); sensorValue = analogRead(sensorPin); // reads the sensor value-- must be connected to ADC pin sensorValue = map(sensorValue, 0, 4095, 4095, 0); //creates a visualization of the data over time. This range reflects the bits in the RP2040 chip's ADC GPIO Serial.println(sensorValue); //Print to the Serial Monitor the data in sensor Value delay(500); // I wanted to track teh data quickly }