I am trying to use NOD MCU ESP8266WiFi with Arduino IDE
When I run this code:
I get the following error:
2 Answers 2
When programming the NODEMCU card with the Arduino IDE, you need to customize it and you must have selected the correct card.
Open Arduino IDE and go to files and click on the preference in the Arduino IDE.
Add the following link to the Additional Manager URLS section: "http://arduino.esp8266.com/stable/package_esp8266com_index.json" and press the OK button.
Then click Tools> Board Manager. Type "ESP8266" in the text box to search and install the ESP8266 software for Arduino IDE.
You will be successful when you try to program again by selecting the NodeMCU card after these operations. I hope I could help.
Starting with 1.6.4, Arduino IDE can be used to program and upload the NodeMCU board by installing the ESP8266 third-party platform package (refer https://github.com/esp8266/Arduino):
- Start Arduino, go to File >Preferences
- Add the following link to the Additional Boards Manager URLs: http://arduino.esp8266.com/stable/package_esp8266com_index.json and press OK button
- Click Tools >Boards menu >Boards Manager, search for ESP8266 and install ESP8266 platform from ESP8266 community (and don’t forget to select your ESP8266 boards from Tools >Boards menu after installation)
To install additional ESP8266WiFi library:
- Click Sketch >Include Library >Manage Libraries, search for ESP8266WiFi and then install with the latest version.
After above steps, you should compile the sketch normally.
I’m trying to make a "home weight" with my ESP32 and display the value using IBMCloud, however I’m running into some issues with the Arduino IDE and my code.
I get this error:
Arduino:1.8.5 (Windows 10), Tarjeta:"ESP32 Dev Module, QIO, 80MHz, 4MB (32Mb), 921600, None"
C:UsersXXDocumentsArduinoIBM_Watson_ConnectIBM_Watson_Connect.ino:8:25: fatal error: ESP8266WiFi.h: No such file or directory
exit status 1 Compiling error for the ESP32 Dev Module card.
I’m using a ESP32 dev board. My code is this:
Some places mentioned that the library was missing, that the board wasn’t properly selected, the library wasn’t updated.. I checked them all.. Arduino is updated, libraries are installed and updated, proper board is selected (I actually have tried all the other Esp32 related boards with the same result)
I want to turn my esp8266 into access point so that i would able to connect directly to it.i use the following sketch but when i select GENERIC module ESP8266 from menu the two libraries which is ESP8266WiFi.h and #include ESP8266WebServer.h become available but at this point i was unable to upload sketch to arduino.Also when i select Board as arduino uno(Which i have really) and then what to upload then the above two files becomes unavailable and says fatal error no such file. no idea what to do next. Thanks in advance for kind attention.
3 Answers 3
The ESP8266 core for Arduino that you’re trying to use is for programming ESP8266 directly. You are trying to program an Uno with an ESP8266 connected to it for use as a WiFi module. For that application the ESP8266 core is of no use. For your application it’s most common to run the AT firmware on the ESP8266 and communicate via serial. If you’re doing that I recommend the WiFiEsp library:
Since you’re uploading to the Uno you should have Arduino/Genuino Uno selected in the Tools > Board menu.
There are two ways to use an ESP8266.
You seem to say you are using it as a slave to your UNO. You program you Uno from the IDE. The program will have code in it to send ‘AT’ commands to the ESP and this will make the ESP handle all the WIFI stuff.
You remove you Uno and use the ESP as the main processor. This means you get to program the ESP with C++ like code through the IDE, just as if it was an UNO. HOWEVER you will need to install the ESP package from the board manager and there are certain limitations. You also have access to less IO ports, but you can connect the Uno (over serial or I2C) and use it as a slave (which you program through the IDE separately).