ESP 13 Wifi Shield (ESP8266) running DOIT firmware

Hello All,

I am currently having an issue with connecting to the Blynk server through my Wifi shield and after looking around for about 4 hours I have had no luck in finding anyone who has used the wifi shield specified to connect to the Blynk service. I was wondering:

  1. Is the DOIT firmware supported
  2. If so, how would one go about integrating that with Blynk on a code level

I have tried to reflash the original firmware with no luck so if anyone has any idea on how to do this, I would love to know.

Specifications:

  • Arduino Leonardo with an ESP 13 Wifi Shield (ESP8266) from Jaycar running the DOIT firmware.
  • Android ver: 8.1.0
  • Blynk server
  • Latest Blynk library (downloaded yesterday)
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

#define EspSerial Serial1
#define ESP8266_BAUD 9600

int inputPin = 2;               // choose the input pin (for PIR sensor)
int pirState = LOW;             // we start, assuming no motion detected
int val = 0;                    // variable for reading the pin status
char auth[] = "*******************"; //Blynk key
char ssid[] = "WiFiName";
char pass[] = "WiFiPassword";

ESP8266 wifi(&EspSerial);
 
void setup() {
  pinMode(inputPin, INPUT);     // declare sensor as input
 
  Serial.begin(9600);

  delay(10);
  EspSerial.begin(ESP8266_BAUD);
  delay(10);
  Blynk.begin(auth, wifi, ssid, pass);
  Blynk.virtualWrite(V0, WiFi.localIP());
}
 
void loop(){
  Blynk.run();
  val = digitalRead(inputPin);  // read input value
  if (val == HIGH) {            // check if the input is HIGH
    if (pirState == LOW) {
      Blynk.notify("Motion detected!");
      pirState = HIGH;
    }
  } else {
    if (pirState == HIGH){
      Blynk.notify("Motion ended!");
      pirState = LOW;
    }
  }
}

Thanks in advance for the help.

I do not see how this pertains to the program I have posted above.

//in setup
timer.setInterval(1000, pirState);


void pirState(){
 val = digitalRead(inputPin);  // read input value
  if (val == HIGH) {            // check if the input is HIGH
    if (pirState == LOW) {
      Blynk.notify("Motion detected!");
      pirState = HIGH;
    }
  } else {
    if (pirState == HIGH){
      Blynk.notify("Motion ended!");
      pirState = LOW;
    }
  }

void loop(){
  Blynk.run();
 }

Read the documentation, particularly about limitations on sending notifications once every 5 seconds… not potentially thousands of times a second… then look again :wink:

If it is this thing you are using…

image

Then search for keywords like Robotdyn… as that is a similar concept for a WiFi shield… and it can be a pain to work with. You need to determine how to configure it to act as a simple Serial to WiFi transceiver (AT mode) and it must be configurable to the same pins as your Leonardo’s Serial1 Pins 0 & 1. If not, then you need to use Software Serial instead… just like on an UNO.

If you have the option, I highly recommend a simpler ESP-01 for your Arduino. Or better yet, a full ESP8266 Dev board like the Wemos D1 Mini or NodeMCU

I’ll look into buying an ESP-01, getting a grasp of that and then maybe coming back to the shield at a later date.

Iirc there is an issue with the TX and RX pins not being in the right order when the ESP13 shield is mounted. You may need to disconnect the shield, power it with a separate 5volt supply, and manually wire the shield TX to the board Rx, and the shield Rx to the board Tx.