Virtual ESP32 Simulator provides you a way to keep learning ESP32 programming online. No hardware needed. Wokwi ESP32 simulator supports Arduino style programming as well as Micropython. You will save lot of time, you can program from anywhere. No need to download or install.
This project is about connecting a photo sensor (light sensor) to an ESP32 simulator. The Photo sensor has only three connections - Power, Ground and Data. The data line will change it's state based on the amount of light falling on the sensor. This can be used to several projects including a garage door sensor based on the light or the application where you can turn on lights only during evening, automatically. Let us begin
ESP32 SimulatorThe link to the online ESP32
https://wokwi.com/arduino/projects/310595963995554370
The code#include <LiquidCrystal_I2C.h>
#define LDR_PIN 2
LiquidCrystal_I2C lcd(0x27, 20, 4);
void setup() {
pinMode(LDR_PIN, INPUT);
lcd.init();
lcd.backlight();
}
void loop() {
lcd.setCursor(2, 0);
lcd.print("Question: ");
if (digitalRead(LDR_PIN) == LOW) {
lcd.print("FALSE!");
} else {
lcd.print("TRUE! ");
}
delay(100);
}
The connection diagramThe below article answers the following questions
- How to draw and connect using wires
- How to add a part in the Wokwi Simulator
- How to change wire colours
- How to delete a part on Wokwi
- How to move, rotate parts on the Wokwi Simulator and more
https://www.hackster.io/Hack-star-Arduino/how-to-use-wokwi-arduino-simulator-what-is-wokwi-304e6b
Support/feedback/suggestions?you have many ways to ask for help, suggest a feature or share your feedback
- Open an issue on GitHub
- Visit Facebook group
- Hop on to Discord Server!
- leave a comment here 😅
Comments
Please log in or sign up to comment.