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

Arduino Like Function on Kinetis K82 Freedom Stupid Board
Intermediate
  • 55
  • 4

Protip

1000 of K82 Freedom Boards are collecting dust because of the hobbyist unfriendly IDE, pump up the duds with easy Arduino-like functions.

Raspberry Pi Motion Tracking Gun Turret
Intermediate
  • 997
  • 13

Full instructions

A motion tracking airsoft or Nerf gun turret with autonomous and manual operation modes, controlled by a Raspberry Pi.

Reducing Arduino Power Consumption
Intermediate
  • 144
  • 5

Full instructions

One the most important feature of portable electronics should be long battery life. We can reduce the current drawn by several ways.

Arduinomated Car Parking with Voice Assistance in Smartphone
Intermediate
  • 427
  • 10

Full instructions

Make an assistant which tells you about how much to drive backwards without any collision through your smartphone by Arduino and 1Sheeld.

Particle Photon Based Security System with Alerting
Intermediate
  • 1,345
  • 20

Full instructions

Be alerted to any door or window opening and closing in your house on your smart phone.

Traffic Monitor- Monitors traffic on the Go
Intermediate
  • 84
  • 2

Full instructions

The device uses color indication to display traffic on the road you are driving or you have selected.

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaFree StoreBlog