Razaq Nawfal
Published © GPL3+

Making a smart parking with Arduino

The coding

BeginnerProtip1 hour344
Making a smart parking with Arduino

Things used in this project

Hardware components

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

Software apps and online services

Arduino IDE
Arduino IDE
Blynk
Blynk

Story

Read more

Code

Smart Parking Blynk

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

#define BLYNK_PRINT Serial

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

char auth[] = ""; // Your auth token from Blynk
char ssid [] = ""; // Your WiFi name
char pswd [] = ""; // Your 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("Tidak terkoneksi");
  }
}

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

Credits

AbdurRazaq

Posted by Razaq Nawfal

Comments