Compile error 'ESP8266' was not declared in this scope

Hello
I’m trying to apply a youtube video IoT
I’ve downloaded the code and when I tried to compile it I got the following error message:

 'ESP8266' was not declared in this scope

I’m using Arduino UNO with ESP8266

The full code files are attached
Thanks in advance

ESP8266_BASE_12_10_15_ESP_part3.zip (7.62 KB)

When you encounter an error you'll see a button on the right side of the orange bar "Copy error messages". Click that button. Paste the error in a message here using code tags.

Here it is

Arduino: 1.8.6 Hourly Build 2018/01/03 03:33 (Windows 7), Board: "Arduino/Genuino Uno"

E:\ard\ESP8266_BASE_12_10_15_ESP_part3\n\connect_ESP\ESP8266_BASE_12_10_15_ESP_part3.ino: In function 'boolean connect_ESP()':

ESP8266_BASE_12_10_15_ESP_part3:4: error: 'ESP8266' was not declared in this scope

 #define ESP8266_txPin 7

   ^

ESP8266_BASE_12_10_15_ESP_part3:6: error: 'keyword_OK' was not declared in this scope

 #include <avr/power.h>

                     ^

ESP8266_BASE_12_10_15_ESP_part3:6: error: 'read_until_ESP' was not declared in this scope

 #include <avr/power.h>

                                                         ^

ESP8266_BASE_12_10_15_ESP_part3:7: error: 'serial_dump_ESP' was not declared in this scope

 

                   ^

ESP8266_BASE_12_10_15_ESP_part3:10: error: 'payload_size' was not declared in this scope

 const char SSID_KEY[] = "a14102016a";

                 ^

ESP8266_BASE_12_10_15_ESP_part3:14: error: 'keyword_carrot' was not declared in this scope

 //MODES

                     ^

ESP8266_BASE_12_10_15_ESP_part3:17: error: 'payload' was not declared in this scope

 

                   ^

ESP8266_BASE_12_10_15_ESP_part3:19: error: 'keyword_sendok' was not declared in this scope

 

                       ^

ESP8266_BASE_12_10_15_ESP_part3:33: error: 'setup_ESP' was not declared in this scope

 unsigned long timeout_start_val;

             ^

exit status 1
'ESP8266' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Arduino: 1.8.6 Hourly Build

If you are using the hourly build version, you are expected to be smarter than you've given evidence of.

Using the released 1.8.2 version of the IDE, when I compile your code, I get:

Sketch uses 8886 bytes (27%) of program storage space. Maximum is 32256 bytes. Global variables use 1343 bytes (65%) of dynamic memory, leaving 705 bytes for local variables. Maximum is 2048 bytes.

Any useful reply?

zampoot: Any useful reply?

Install the released 1.8.2 version of the IDE perhaps ?

Even using the same hourly build I can't reproduce this problem. The output you posted is all messed up, with the line numbers of the errors not matching the content of that line. This indicates to me there is a problem with the #line directives (and possibly with other things) added by the Arduino IDE sketch preprocessor.

Certainly you should not expect the hourly build to be as stable as the release versions of the Arduino IDE so it makes sense to try a release version if you're encountering a strange bug.

I've Installed the released 1.8.2 version of the IDE Same issue

zampoot: I've Installed the released 1.8.2 version of the IDE Same issue

Did you uninstall the hourly build version first?

PaulS: Did you uninstall the hourly build version first?

But hourly build does not require setup it's like portable application I guess

Why install the hourly build in the first place unless it contains a fix or feature that you absolutely cannot live without ?