car parking vishwa — ESP32 simulation

An interactive ESP32 circuit simulation you can run free in your browser on Velxio, by vishwesvaran52.

Components

Sketch code

#include<LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
int motion1=2;
int motion2=4;
int motion3=12;
int motion4=13;


void setup() {
  pinMode(motion1, INPUT);
  pinMode(motion2, INPUT);
  pinMode(motion3, INPUT);
  pinMode(motion4, INPUT);
  lcd.init();
  lcd.backlight();
 
  
}

void loop() {
  int Sensorvalue1=digitalRead(motion1);
  int Sensorvalue2=digitalRead(motion2);
  int Sensorvalue3=digitalRead(motion3);
  int Sensorvalue4=digitalRead(motion4);
  lcd.clear();
  lcd.setCursor(1, 0);
  lcd.print("CAR ");
  lcd.setCursor(1, 1);
  lcd.print("PARKING ");
  delay(2000);
  lcd.clear();

  

  
  for(Sensorvalue1==HIGH){
  lcd.setCursor(1, 0);
  lcd.print("availabe slot");
  lcd.setCursor(2, 1);
  lcd.print(" -1");
  delay(3000);
  lcd.clear();}
  if(Sensorvalue1==LOW){
  lcd.setCursor(1, 0);
  lcd.print("availabe slot");
  lcd.setCursor(2, 1);
  lcd.print(" 1");
  delay(3000);
  lcd.clear();}
  }
 



  }

More projects by vishwesvaran52