Hi,
I am trying to repeat a project from the book: "A Hands-On Course in Sensors using Arduino and Raspberry Pi." by Volker Ziemann. The project is to use a NodeMCU 8266 to connect to a host computer. I have downloaded the libraries for the NodeMCU (there were alot) and I believe they have been placed properly in the correct folder, but I'm not sure since for some reason I could not add it via the ZIP file method. I had to do it manually.
The NodeMCU is connected to a temperature sensor and should take readings and post on an internal network webpage.
When I verify the code, I get the error "'WL_CONNECTED' was not declared in this scope". From my research on the web, this could mean that the 'WL_CONNECTED' is not defined and so I have to make sure the library is included. But, I've tried including other libraries like WiFi.h, and it won't fix the problem. I've also made sure the WiFi libraries are in the the library folder in Arduino. They seem to be in the right place...
I've also tried searching the forum for similar problems.
I've attached the code.
Thanks.
Here is the copied error message from the IDE:
Arduino: 1.8.5 (Windows 7), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
sketch_sep09e_webserver_to_read_temperature_for_forum:13: error: 'WL_CONNNECTED' was not declared in this scope
while (WiFi.status() != WL_CONNNECTED){
^
exit status 1
'WL_CONNNECTED' was not declared in this scope
sketch_sep09e_webserver_to_read_temperature_for_forum.ino (1.38 KB)