Things used in this project

Schematics

Smart Parking
Fritzing

Code

Smart Parking.inoArduino
#define BLYNK_PRINT Serial
#include <SPI.h>
#include <Ethernet.h>
#include <BlynkSimpleEthernet.h>
char auth[] = "";    // Write your Blynk project key here
WidgetLED led1(V1);   // Virtual LED to show status on App
WidgetLED led2(V2);
WidgetLED led3(V3);
int sensor1 = 2;      // IR Sensors
int sensor2 = 3;
int sensor3 = 4;

void setup()
{
  Serial.begin(9600);
  Blynk.begin(auth);         // Starting Blynk server and connecting to the cloud
  
  pinMode(sensor3,INPUT);    // Setting sensors to input
  
  pinMode(sensor2,INPUT);
  
  pinMode(sensor1,INPUT);

  while (Blynk.connect() == false) {
    // Wait until connected
  }
}
 void loop() {  
   int sensorval1 = digitalRead(sensor1); // Saving Values os sensors
   int sensorval2 = digitalRead(sensor2);
   int sensorval3 = digitalRead(sensor3);
   Serial.println(sensorval1);            // printing values 
   Serial.println(sensorval2);
   Serial.println(sensorval3);
   delay(1000);
   if (sensorval1 == 1)
   {
led1.on();                                 // Setting virtual led on the app
}
   if (sensorval2 == 1)
   {
led2.on();
}
   if (sensorval3 == 1)
   {

led3.on();}
    if (sensorval1 == 0)
   {

led1.off();
}
   if (sensorval2 == 0)
   {
led2.off();
}
   if (sensorval3 == 0)
   {
led3.off();
}   
    
    Blynk.run();
    
     }

Credits

11705524 10207718519433933 871861552687634133 o
Kaustubh Agarwal

IOT Enthusiast

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Direction Indicators for Bikes
Intermediate
  • 177
  • 5

Full instructions

Riding bike is a little dangerous. With the Direction Indicators for a bike, car's know if you want to turn right or left. Make biking safe!

Starry Night Prom
Intermediate
  • 1,593
  • 12

How did I stand out at prom? In a light up dress of course!

The Trump Button
Intermediate
  • 844
  • 7

Full instructions

The famous connected button to order your favorite drink using Sigfox network.

Third Eye for The Blind
Intermediate
  • 748
  • 11

Full instructions

An innovative wearable technology for visually impaired peoples.

ArduRadio AlarmClock
Intermediate
  • 1,708
  • 2

Full instructions

Build an FM radio with alarm clock.

Arduino: Switching ON/OFF Appliances Using IR Remote
Intermediate
  • 94
  • 2

Press 'Power' to switch everything ON/OFF. Press '1' for the fan and '2' for the lights.

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login