Riza Wirsha
Published

Arduino smart parking

Making a smart parking system

BeginnerWork in progress159
Arduino smart parking

Things used in this project

Hardware components

NodeMCU ESP8266 Breakout Board
NodeMCU ESP8266 Breakout Board
×1
LED (generic)
LED (generic)
×1
Female/Female Jumper Wires
Female/Female Jumper Wires
×3

Software apps and online services

Arduino IDE
Arduino IDE
Blynk
Blynk

Story

Read more

Code

Untitled file

C/C++
// Download Blynk and ESP8266 in your Arduino libraries

#define BLYNK_PRINT Serial

#include <BlynkSimpleEsp8266.h>
#include <ESP8266WiFi.h>

char auth [] = ""; // auth token from Blynk
char ssid [] = ""; // WiFi name
char pswd [] = ""; // WiFi password

WidgetLED led1(V1);

int sensor1 = D4;

void setup()
{

Serial.begin(9600);
Blynk.begin(auth,ssid,pswd);
pinMode(sensor1, INPUT);
while (Blynk.connect() == false) {
Serial.println("not connected");
  }
}

void loop()
{
  int sensorval1 = digitalRead(sensor1);
  delay(1000);
if (sensorval1 == 1)
  {
led1.on();
  }
if (sensorval1 == 0)
  {
led1.off();
  }
  Blynk.run();
}

Credits

Riza Wirsha

Riza Wirsha

6 projects • 0 followers

Comments

Add projectSign up / Login