Troubleshoot

1. Error: 'WiFiServer' does not name a type on Windows OS

There is a bug on the Windows OS that might occur for some users. OS creates conflicts as it downloads ESP8266wifi automatically and you can not disable it.

So if you are using Windows and you encounter this error, you have to delete the line: https://github.com/ekstrand/ESP8266wifi
in the .../air.nodemcu.full/platformio.ini file before you build your project.

If you are already getting 'error: 'WiFiServer' does not name a type' it means that you have attempted to build with https://github.com/ekstrand/ESP8266wifi in platformio.ini

To fix this:

  1. Delete: https://github.com/ekstrand/ESP8266wifi in ../air.nodemcu.full/platformio.ini file
  2. Delete: ESP8266wifi lib which is already installed in your .../air.nodemcu.full/.piolibdeps/ folder
  3. Rebuild

2. Serial Monitor does not work in Visual Studio Code

If you are using PlatformIO in Visual Studio Code, your serial monitor might not work because PlatformIO release for this editor forces baud rate to 9600. In order to fix this, go to platformio.ini file in a project folder and locate section corresponding to your development board (In our case it is NodeMCU v2, so locate [env:nodemcuv2] and put next line below it:

monitor_speed = 115200
1531

By doing this, you set the default baud rate to 115200 and you should be able to communicate with your board using the serial monitor.

3. Error: Config.ctos.h: No such file or directory

If you get this error, please refer to 1. WIFI Settings in Code section.

4. Error: Device.h: No such file or directory

If you get this error, please refer to 4. Enable or Disable Sensors and Devices in Code in Code section.

5. Restart Atom environment

To completely uninstall Atom you have to:

delete the app from the Applications folder
delete the invisible .atom directory from the home folder
delete the /usr/local/bin/atom tool
delete the /usr/local/bin/apm tool
delete the ~/Library/Preferences/com.github.atom.plist file

rm -rf ~/.atom/    
rm  /usr/local/bin/atom 
rm /usr/local/bin/apm
rm ~/Library/Preferences/com.github.atom.plist

6. Install remember session

Install a simple package to save your session when you close Atom.

apm install remember-session

7. Linter-GCC

On a fresh PlatformIO/Atom install you can face with Linter-GCC issue.

It will disappear after you ran 'BUILD' on a project for the first time.

So, what you have to do is: alt+cmd+b