0% found this document useful (0 votes)
2 views

ESP32, STM32, Arduino Simulator

The document is a code snippet for an online simulator that demonstrates the use of an ESP32, STM32, or Arduino with an LCD display and ultrasonic sensors. It includes logic for displaying charging status for two slots based on distance measurements. The code also manages digital output pins to control charging states and includes wiring details for the components used.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

ESP32, STM32, Arduino Simulator

The document is a code snippet for an online simulator that demonstrates the use of an ESP32, STM32, or Arduino with an LCD display and ultrasonic sensors. It includes logic for displaying charging status for two slots based on distance measurements. The code also manages digital output pins to control charging states and includes wiring details for the components used.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

02/06/2025, 23:06 Wokwi - Online ESP32, STM32, Arduino Simulator

SAVE SHARE SIGN UP

sketch.ino diagram.json libraries.txt Library Manager Simulation


28 56 voidlcd.setCursor(0,
loop() { 0);
55 57 } lcd.print("Slot-1
else { off");
58 digitalWrite(OUTPUT_PIN1, LOW);
59 }
60
61 if (distance2 < 10) { V S SV D DV 0 R S R W E D 0 D 1 D 2 D 3 D 4 D 5 D 6 D 7 A K
1 16
62 lcd.setCursor(0, 1);
63 lcd.print("Slot-2 charging");
64 digitalWrite(OUTPUT_PIN2, HIGH);
65 } else {
66 lcd.setCursor(0, 1);
67 lcd.print("Slot-2 off");
68 digitalWrite(OUTPUT_PIN2, LOW);
69 }
HC-SR04 HC-SR04
70
AREF

2
TX→1
RX←0
13
12

~9

~6
~5

~3
GND

~11
~10

71 delay(1000); // DIGITAL
Adjust delay
(PWM ~) as needed for your application

TRIG
ECHO

TRIG
ECHO
VCC

GND

VCC

GND
72 } L

TX
UNO ON
RX ARDUINO
IOREF
RESET

POWER ANALOG IN
3.3V

GND
GND
Vin
5V

A0
A1
A2
A3
A4
A5

PWR PWR
CN MOC ON

CN MOC ON

VCC VCC

GND Relay
Module
GND Relay
Module
IN IN

LED1 LED1

https://wokwi.com/projects/389416617333481473 1/1

You might also like