//Fab Academy 2023 - Fab Lab León //Phototransistor //Fab-Xiao int sensorPin = A0; // analog input pin RP2040 pin 26 or ESP32-C3 pin A0 int sensorValue = 0; // variable to store the value coming from the sensor void setup() { Serial.begin(115200); // initialize serial communications } void loop() { sensorValue = analogRead(sensorPin); // read the value from the sensor sensorValue = map(sensorValue, 0, 1024, 1024, 0); Serial.println(sensorValue); // print value to Serial Monitor //mySerial.println("x"); // print value "x" to Serial Monitor delay(50); // short delay so we can actually see the numbers }