How to use LDR sensor on ESP32 ???
Let's learn it now with just a simple step.
Firstly, you must have Arduino IDE software. You may see tutorial to download Arduino IDE here (https://sianfeng18.wixsite.com/website/post/download-arduino-ide).
Open the Arduino IDE software.
3. Next, go to File > Examples > Basics > AnalogReadSerial.
4. The example of coding will come out as shown below :
5. Change the input pin (A0) to (35) , because I am using pin D35.
6. Also make a change for the delay , which is (1) to (500). To make it read the sensor slower.
7. Now, do the connection of circuit as below :
8. Upload and run the coding as usual by clicking on the right-pointing arrow and you will see the result as below :
The tutorial is done. Have a try on it and have fun !!! See you in the next blog. byeeeee
Commentaires