How to Interface an LDR with ESP32 and BeagleBone Black for Light Monitoring System?

Hello, I’m working on a light intensity monitoring system using BeagleBone Black and a Esp32. I’m interfacing an LDR (Light Dependent Resistor) through the Esp32 with a 4-digit 7-segment display to show light levels. Could you guys guide me through the setup, For instance how do I connect the LDR properly to the Esp32 and interface it with BeagleBone Black?

This is my code below, the issue is am getting no reading from my Esp32
     int sensorValue = 0;
     void setup() {
         pinMode(A0, INPUT);
         Serial.begin(9600);
     }
     void loop() {
         sensorValue = analogRead(A0);
         Serial.println(sensorValue);
         delay(1000);
     }
Was this page helpful?