top of page
Search

LDR sensor on ESP32

  • sianfeng18
  • Oct 15, 2020
  • 1 min read

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.

ree












3. Next, go to File > Examples > Basics > AnalogReadSerial.

ree













4. The example of coding will come out as shown below :

ree

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.

ree














7. Now, do the connection of circuit as below :

ree












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

 
 
 

تعليقات


Post: Blog2_Post

01121997572

  • Facebook
  • Instagram

©2020 by ANG SIAN FENG. Proudly created with Wix.com

bottom of page