top of page
Search
sianfeng18

LDR sensor on ESP32

Updated: Oct 17, 2020

How to use LDR sensor on ESP32 ???

Let's learn it now with just a simple step.


  1. 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).

  2. 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

59 views0 comments

Recent Posts

See All

Commentaires


Post: Blog2_Post
bottom of page