Smart car parking system using NodeMcu ESP8266 and Arduino

Before creating the topic

  1. Search forum for similar topics
  2. Check http://docs.blynk.cc and http://help.blynk.cc/
  3. Add details :
    • Hardware model + communication type. For example: Arduino UNO with Ethernet Shield
    • Smartphone OS (iOS or Android) + version
    • Blynk server or local server
    • Blynk Library version
    • Add your sketch code. :point_up:Code should be formatted as example below.

Simply paste your code between ``` If you don’t format your code, your topic can be deleted by moderators.


void loop()

Hello, please I need help, Blynk App sows that was not online yet. below is my NodeMcu Code

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

 
char auth[] = "Y12vESUKNP5YEa7pmHwA_fbwGda1fAKB";
 
// Your WiFi credentials.

char ssid[] = "speeder";
char pass[] = "Billions@";
 
BlynkTimer timer;
 
String myString; // complete message from arduino, which consists of sensors data
char rdata; // received charactors
 
int firstVal, secondVal,thirdVal; // sensors 
int led1,led2,led3,led4,led5,led6;


// This function sends Arduino's up time every second to Virtual Pin (1).
// In the app, Widget's reading frequency should be set to PUSH. This means
// that you define how often to send data to Blynk App.
void myTimerEvent()
{
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V1, millis() / 1000);
  
}
 
 
 
void setup()
{
  // Debug console
  Serial.begin(9600);
 
  Blynk.begin(auth, ssid, pass);
 
    timer.setInterval(1000L,sensorvalue1); 
    timer.setInterval(1000L,sensorvalue2); 
    timer.setInterval(1000L,sensorvalue3);
    timer.setInterval(1000L,sensorvalue4);
    timer.setInterval(1000L,sensorvalue5);
    timer.setInterval(1000L,sensorvalue6);
  
 
}
 
void loop()
{
   if (Serial.available() == 0 ) 
   {
  Blynk.run();
  timer.run(); // Initiates BlynkTimer
   }
   
  if (Serial.available() > 0 ) 
  {
    rdata = Serial.read(); 
    myString = myString+ rdata; 
   // Serial.print(rdata);
    if( rdata == '\n')
    {
     Serial.println(myString); 
  // Serial.println("Rosa");
// new code
String l = getValue(myString, ',', 0);
String m = getValue(myString, ',', 1);
String n = getValue(myString, ',', 2);
String o = getValue(myString, ',', 3);
String p = getValue(myString, ',', 4);
String q = getValue(myString, ',', 5);
 
 
// these leds represents the leds used in Blynk application
led1 = l.toInt();
led2 = m.toInt();
led3 = n.toInt();
led4 = o.toInt();
led5 = p.toInt();
led6 = q.toInt();
 
  myString = "";
// end new code
    }
  }
 
}
 
void sensorvalue1()
{
int sdata = led1;
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V10, sdata);
 
}
void sensorvalue2()
{
int sdata = led2;
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V11, sdata);
 
}
 
void sensorvalue3()
{
int sdata = led3;
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V12, sdata);
 
}
 
void sensorvalue4()
{
int sdata = led4;
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V13, sdata);
 
}
 
void sensorvalue5()
{
int sdata = led5;
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V14, sdata);
 
}
 
void sensorvalue6()
{
int sdata = led6;
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V15, sdata);
 
}
 
 
 
 
 
 
String getValue(String data, char separator, int index)
{
    int found = 0;
    int strIndex[] = { 0, -1 };
    int maxIndex = data.length() - 1;
 
    for (int i = 0; i <= maxIndex && found <= index; i++) {
        if (data.charAt(i) == separator || i == maxIndex) {
            found++;
            strIndex[0] = strIndex[1] + 1;
            strIndex[1] = (i == maxIndex) ? i+1 : i;
        }
    }
    return found > index ? data.substring(strIndex[0], strIndex[1]) : "";
}```

the serial monitor shows 255 once a put a toy car near the IR sensor.
![Screenshot (179)|690x388](upload://aUhPTIAZu6Qvoqpwp1uzFY53LTf.png)

And what about this info, and your serial monitor info that I asked for when I PM’d you?..

Pete.

Sorry sir, iim using

Arduino UNO Rev3-Main
iOS Smartphone
Blynk server
Blynk library version 1.0.0-beta.1

You should be using 0.6.1

Pete.

Sir, now I am using 0.6.1 and I’m having this error now

esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header

That isn’t a Blynk related issue.
Try googling the error message.

Pete.

Sir, the app still showing was not online yet.

Pete.

Hey Rosa. Did you get a solution for your Blynk problem?
I am working on a similar project

Hey there.
Create a new topic and make sure to provide some details like sketch, hardware, blynk legacy or blynk IOT etc.