[SOLVED] Unable to compile ESP8266_Shield_HardSer.ino from V 0.3.1 Library examples

I am trying to use the example ESP8266_Shield_HardSer, but when I try to compile the program I get the following error.

Arduino: 1.6.5 (Mac OS X), Board: "Generic ESP8266 Module, Serial, 80 MHz, 40MHz, DIO, 115200, 512K (64K SPIFFS), ck"

:0:9: error: expected identifier before numeric constant
/Users/John/Documents/Arduino/libraries/BlynkESP8266_HardSer/ESP8266_HardSer.h:45:7: note: in expansion of macro 'ESP8266’
** class ESP8266 {**
** ^**
:0:9: error: expected unqualified-id before numeric constant
/Users/John/Documents/Arduino/libraries/BlynkESP8266_HardSer/ESP8266_HardSer.h:45:7: note: in expansion of macro 'ESP8266’
** class ESP8266 {**
** ^**
Error compiling.

I only have the Blynk V 0.3.1 library installed, and I have tried the compile on both MAC and Windows machines with Identical results, and I have also tried with version 1.6.7 of the Arduino IDE again still the same error.

Does anyone have any ideas?

Regards

John

I think it’s a bug in your code, but I’m not really sure. Can you post your code? I’ll try and compile it on my 1.6.5 (also Mac). The latest Arduino IDE is not as stable as the 1.6.5. is my experience.

Thank you for your response, this problem occures when compiling the sample code with no changes made. So just select the ESP8266_Shield_HardSer.ino and then verify.

Regards

John

Did you select the ESP board or the Arduino board? Because this example is configured for Arduino board with a serial interface and I think you selected the ESP board instead…

1 Like

Hi again,
Yes you are correct I did select the ESP board and not the Arduino. Sorry to have wated your time.
What I want to do use an ESP8266-01 and an Arduino Due to conect to BLYNK, can you please point me to the correct example so that I have somewhere to start from.

Thanks John

You have the right example, just the wrong board :smile:

You have to upload the sketch to your Due board and attach the Tx/Rx pins to the Rx/Tx pins on your Due board.

And that time, it’s mine to waste and times enjoyed wasting is not time wasted :wink:

1 Like

OK, but what runs in the ESP8266-01? Is it just the firmware that I have already flashed to it? I have obviously not fully understood the total picture.

Regards
Time waster in Chief, but also fully enjoying it.

On the ESP there should be so called AT firmware.

It may be easier to only use the ESP though. You can run Blynk standalone on that too. The benefits are for one that you have more memory available, but you can go either way.

  1. Arduino + ESP attached to serial tx/rx (needs AT firmware, maybe start here: http://www.instructables.com/id/Intro-Esp-8266-firmware-update/ combined with: http://reflowster.com/blog/2015/05/11/esp8266.html )

  2. Run all the stuff on your ESP. You have to attach the ESP to a serial port to program it from the Arduino IDE, the link above from Reflowster has a nice schema for automatic programming which I personally like to use.

1 Like

Hi, Thank you, you have got on the correct path and I can switch the D13 LED on the DUE on and off from a Blynk app on my phone.

Now for some real fun

John

You’re welcome and you know where to find us if you got any questions :wink: