Professional Documents
Culture Documents
Parking
Parking
#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(sensor2,INPUT);
pinMode(sensor1,INPUT);
led3.on();}
if (sensorval1 == 0)
{
led1.off();
}
if (sensorval2 == 0)
{
led2.off();
}
if (sensorval3 == 0)
{
led3.off();
}
Blynk.run();