ESP8266 core for Arduino

Arduino core for ESP8266 WiFi chip

Quick links

Arduino on ESP8266

This project brings support for the ESP8266 chip to the Arduino environment. It lets you write sketches, using familiar Arduino functions and libraries, and run them directly on ESP8266, with no external microcontroller required.

ESP8266 Arduino core comes with libraries to communicate over WiFi using TCP and UDP, set up HTTP, mDNS, SSDP, and DNS servers, do OTA updates, use a file system in flash memory, and work with SD cards, servos, SPI and I2C peripherals.

Contents

Installing with Boards Manager

Starting with 1.6.4, Arduino allows installation of third-party platform packages using Boards Manager. We have packages available for Windows, Mac OS, and Linux (32 and 64 bit).

  • Install the current upstream Arduino IDE at the 1.8.9 level or later. The current version is on the Arduino website.
  • Start Arduino and open the Preferences window.
  • Enter https://arduino.esp8266.com/stable/package_esp8266com_index.json into the File>Preferences>Additional Boards Manager URLs field of the Arduino IDE. You can add multiple URLs, separating them with commas.
  • Open Boards Manager from Tools > Board menu and install esp8266 platform (and don't forget to select your ESP8266 board from Tools > Board menu after installation).

Latest release Latest release

Boards manager link: https://arduino.esp8266.com/stable/package_esp8266com_index.json

Documentation: https://arduino-esp8266.readthedocs.io/en/3.0.2/

Using git version

Linux build status

Also known as latest git or master branch.

Using PlatformIO

PlatformIO is an open source ecosystem for IoT development with a cross-platform build system, a library manager, and full support for Espressif (ESP8266) development. It works on the following popular host operating systems: macOS, Windows, Linux 32/64, and Linux ARM (like Raspberry Pi, BeagleBone, CubieBoard).

Building with make

makeEspArduino is a generic makefile for any ESP8266 Arduino project. Using make instead of the Arduino IDE makes it easier to do automated and production builds.

Documentation

Documentation for latest development version: https://arduino-esp8266.readthedocs.io/en/latest/

Issues and support

ESP8266 Community Forum is a well-established community for questions and answers about Arduino for ESP8266. Stackoverflow is also an alternative. If you need help, have a "How do I..." type question, have a problem with a 3rd party library not hosted in this repo, or just want to discuss how to approach a problem, please ask there.

If you find the forum useful, please consider supporting it with a donation.
Donate

If you encounter an issue which you think is a bug in the ESP8266 Arduino Core or the associated libraries, or if you want to propose an enhancement, you are welcome to submit it here on Github: https://github.com/esp8266/Arduino/issues.

Please provide as much context as possible, as well as the information requested in the issue template:

  • ESP8266 Arduino core version which you are using (you can check it in Boards Manager)
  • your sketch code; please wrap it into a code block, see Github markdown manual
  • when encountering an issue that happens at run time, attach the serial output. Wrap it into a code block, just like the code.
  • for issues that happen at compile time, enable verbose compiler output in the IDE preferences, and attach that output (also inside a code block)
  • ESP8266 development board model
  • IDE settings (board choice, flash size)
  • etc

Contributing

For minor fixes of code and documentation, please go ahead and submit a pull request. A gentle introduction to the process can be found here.

Check out the list of issues that are easy to fix — easy issues pending. Working on them is a great way to move the project forward.

Larger changes (rewriting parts of existing code from scratch, adding new functions to the core, adding new libraries) should generally be discussed by opening an issue first. PRs with such changes require testing and approval.

Feature branches with lots of small commits (especially titled "oops", "fix typo", "forgot to add file", etc.) should be squashed before opening a pull request. At the same time, please refrain from putting multiple unrelated changes into a single pull request.

License and credits

Arduino IDE is developed and maintained by the Arduino team. The IDE is licensed under GPL.

ESP8266 core includes an xtensa gcc toolchain, which is also under GPL.

Esptool.py was initially created by Fredrik Ahlberg (@themadinventor, @kongo), and is currently maintained by Angus Gratton (@projectgus) under GPL 2.0 license.

Espressif's NONOS SDK included in this build is under Espressif MIT License.

ESP8266 core files are licensed under LGPL.

SPI Flash File System (SPIFFS) written by Peter Andersson is used in this project. It is distributed under the MIT license.

umm_malloc memory management library written by Ralph Hempel is used in this project. It is distributed under the MIT license.

SoftwareSerial library and examples written by Peter Lerup. Distributed under LGPL 2.1.

BearSSL library written by Thomas Pornin, built from https://github.com/earlephilhower/bearssl-esp8266, is used in this project. It is distributed under the MIT License.

LittleFS library written by ARM Limited and released under the BSD 3-clause license.

uzlib library written and (c) 2014-2018 Paul Sokolovsky, licensed under the ZLib license (https://www.zlib.net/zlib_license.html). uzlib is based on: tinf library by Joergen Ibsen (Deflate decompression); Deflate Static Huffman tree routines by Simon Tatham; LZ77 compressor by Paul Sokolovsky; with library integrated and maintained by Paul Sokolovsky.

Other useful links

Toolchain repo

Lwip link layer repo

SoftwareSerial repo

Serial Monitor Arduino IDE plugin Original discussion here, quick download there.

FTP Client/Server Library

Owner
ESP8266 Community Forum
ESP8266 Community Forum
Comments
  • Esp8266 IP Address not reachable after a while

    Esp8266 IP Address not reachable after a while

    Hi All, ESP abecomes unavailable after sometime intermittently where it says Connection to http://192.168.1.4:80 refused org.apache.http.conn.HttpHostConnectException: Connection to http://192.168.1.4:80 refused

    The same happens from the web browser and then it starts working randomly. Checking the logs of the ESP device itself there is no crash.

    Am i missing something in the setup of the server which can keep it alive all the time.

    I thought this was a webserver problem but it seems like and ESP issue. Here is the related issue https://github.com/me-no-dev/ESPAsyncWebServer/issues/54

    Cheers, Akash A

  • "Phase Locked" Waveform: fix significant jitter, that stresses servos and is clearly audible in Tone output

    • Improves jitter that occurs when multiple GPIOs are served
    • Improves on the poor timing which results in servos with narrow deadband constantly re-adjusting
    • Also the Tone library example showed serious interference on various frequencies across 6 or 8 octaves
    • Fixes 0 duration duty of off-cycle handling
    • Allows finishing on HIGH, instead of always forcing LOW on waveform stop. This is required for instance to use waveform for software serial output signal generation, something I am tinkering with for for well over a year now (reminder: I am the current maintainer and author of EspSoftwareSerial).
    • Allows setting waveform at CPU cycle precision instead of just microseconds.
    • Proper semantics of stopping (startWaveformCycles(pin, timeHighCycles, timeLowCycles, runTimeCycles)), runTimeCycles gets applied to the next started FULL period, instead of randomly relative to time of call.
  • Writing files with SPIFFS no longer working for ESP-01

    Writing files with SPIFFS no longer working for ESP-01

    Basic Infos

    SPIFFS no longer works on a ESP-01.

    Hardware

    Hardware: ESP-01 Core Version: 2.3.0-rc2 also tried with stable

    I reproduced this problem on several different ESP-01. So seems not to be hardware related

    Description

    Problem description SPIFFS worked for a long time but all of a sudden it stoped working on a ESP-01. Whenever i write a file its not existing or empty after next boot. Using the same sketch on an Wemos D1 mini its works without problems. Actually im only facing this problem on a ESP-01.

    Settings in IDE

    Module: Generic ESP8266 Module Flash Size: 1MB (64k SPIFFS), also tried with 512k (64k SPIFFS) CPU Frequency: 80Mhz Flash Mode: DIO Flash Frequency: 40Mhz Upload Using: SERIAL Reset Method: ck

    Sketch

    #include <FS.h>

    void setup() { Serial.begin(115200);

    if (!SPIFFS.begin()) Serial.println("error while mounting filesystem!");

    readFile(); writeFile(); readFile();

    Serial.println("done"); }

    void readFile() { Serial.println("reading"); File f = SPIFFS.open("/myFile.txt", "r"); if (!f) Serial.println("file not available"); else if (f.available()<=0) Serial.println("file exists but available <0"); else { String ssidString = f.readStringUntil('#'); Serial.print("read from file: "); Serial.println(ssidString); } f.close(); }

    void writeFile() { Serial.println("writing"); File f = SPIFFS.open("/myFile.txt", "w"); if (!f) Serial.println("File creation failed"); else { f.print("networkConfig"); f.print("#"); f.flush(); f.close(); } }

    void loop() { }

    Debug Messages

    messages here

    • Output of first run: reading file not available writing reading read from file: <--- here we see the problem already done

    • Output of second run: eading file not available writing reading read from file: done

    • Output of third run: reading read from file: writing File creation failed <---- check this! reading read from file: done

    Any ideas? thank you!

  • SSL support

    SSL support

    Hi! I would like to know if you plan to include SSL support in the libraries. I've tryed to send some https requests with no sucess.

    It would be cool if it the ESP could act as a secure server too.

    I've checked the some examples from the sdk and they have a code to create a secure server with digital certificate.

    Thanks!

  • SoftwareSerial: wdt reset

    SoftwareSerial: wdt reset

    I use both SoftwareSerial and WiFiClient. During normal operations, it sometimes works for many hours but other times it gives a wdt reset. This looks like it has a relation between SoftwareSerial and WiFiClient.

    If I use mySerial.enableRX(false) before starting the function with the WiFiClient, it seems to keep working, otherwise it looks like to crash on different places.

    ets Jan 8 2013,rst cause:4, boot mode:(3,6) wdt reset This was during client.print() operations, the first client.print with the data succeeded, then just after that, only when sending an empty line with client.print("\r\n") it gave the wdt reset.

    But earlier, it was just during receiving data on the SoftwareSerial: `ets Jan 8 2013,rst cause:4, boot mode:(1,6)``

    And a couple of other times also during normal receiving on the serial: ets Jan 8 2013,rst cause:4, boot mode:(3,7)

    So many different boot modes, they all seem only to occur if I don't use the mySerial.enableRX(false).

    Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

  • ESP.deepSleep hangs after wakeup - ESP12F (Working on older chips)

    ESP.deepSleep hangs after wakeup - ESP12F (Working on older chips)

    Basic Infos

    • [x] This issue complies with the issue POLICY doc.
    • [x] I have read the documentation at readthedocs and the issue is not addressed there.
    • [x] I have tested that the issue is present in current master branch (aka latest git).
    • [x] I have searched the issue tracker for a similar issue.
    • [x] If there is a stack dump, I have decoded it.
    • [x] I have filled out all fields below.

    Platform

    • Hardware: ESP-12F - ESP8266MOD
    • Core Version: SDK:3.0.0-dev(c0f7b44)/Core:2.5.0
    • Development Env: Arduino IDE 1.8.5
    • Operating System: Windows 10

    Settings in IDE

    • Module: Generic ESP8266 Module
    • Flash Mode: QIO (try DIO also)
    • Flash Size: 4MB
    • lwip Variant: v1.4|v2 Lower Memory|Higher Bandwidth (try all)
    • Reset Method: none
    • Flash Frequency: 40Mhz
    • CPU Frequency: 80Mhz
    • Upload Using: SERIAL
    • Upload Speed: 115200

    Problem Description

    A few months ago, we start developing a custom PCB using ESP8266, ESP12F from AI.

    esptool.py --port COM14 flash_id esptool.py v2.6 Serial port COM14 Connecting... Detecting chip type... ESP8266 Chip is ESP8266EX Features: WiFi MAC: cc:50:e3:04:37:7e Uploading stub... Running stub... Stub running... Manufacturer: 20 Device: 4016 Detected flash size: 4MB Hard resetting via RTS pin...

    After successfully deploy 100 boards, we receive a new batch from a distributor on China. The new chip, looks the same as the old one, except it has an Expressif logo instead of AI logo.

    Then, using esptool, we check that was manufactured by other factory

    esptool.py --port COM14 flash_id esptool.py v2.6 Serial port COM14 Connecting... Detecting chip type... ESP8266 Chip is ESP8266EX Features: WiFi MAC: dc:4f:22:5e:93:23 Uploading stub... Running stub... Stub running... Manufacturer: 0e Device: 4016 Detected flash size: 4MB Hard resetting via RTS pin...

    The PCB was build using all the following design rules and experiences from Espressif, blogs, etc. Example: https://www.instructables.com/id/ESP-12F-ESP8266-Module-Minimal-Breadboard-for-Flas/

    Also, we using several recomendations from videos of Andreas Spiess. @SensorsIOT and read post by @igrr.

    image

    • Power: 3 x AA Batteries (4,5v)

    • MCP1700 LDO for 3,3v

    • Capacitor filters: 1000uF and .1uf - VCC to GND

    • GPIO0 - pull up 10k resistor - VCC

    • GPIO2 - pull up 10k resistor - VCC

    • GPIO15 - pull down 10k resistor - GND

    • EN - pull up 10k resistor - VCC

    • RESET - pull up 10k resistor - VCC

    • HARD WIRED GPIO16 to RESET pin.

    The sensor, reads a value, then enter a deepSleep cycle until wakeups. All was working fine in more than 100 pcb!!!

    After receiving the new batch, with the same PCB and CODE, the ESP hangs after wake up.

    We already try 10 chips off the new bach, all have the same issue.

    Trying this simple sketch:

    MCVE Sketch

    
    /**
     * An example showing how to put ESP8266 into Deep-sleep mode
     */
    
     #include <Arduino.h>
    extern "C" {
    #include <user_interface.h>
    }
    
    #define STATUS_LED  2   
     
    void setup() {
    
      
      pinMode(STATUS_LED, OUTPUT);
      
      Serial.begin(74880);
      Serial.setTimeout(2000);
    
      digitalWrite(STATUS_LED, false);
    
      // Wait for serial to initialize.
      while(!Serial) { }
    
      Serial.print("Chip ID: ");
      Serial.println(ESP.getChipId());
    
      rst_info *rinfo = ESP.getResetInfoPtr();
    
      Serial.print(String("\nResetInfo.reason = ") + (*rinfo).reason + ": " + ESP.getResetReason() + "\n");
    
      Serial.println(".");  
      Serial.println("I'm awake.");
    
      delay(1000);
    
      Serial.println("Going into deep sleep for 3 seconds");
      ESP.deepSleep(3e6);    
    
      delay(5000);
    }
    
    void loop() {
    }
    
    
    

    Debug Messages ON WORKING CHIP

    ets Jan  8 2013,rst cause:2, boot mode:(3,6)
    
    load 0x4010f000, len 1384, room 16 
    tail 8
    chksum 0x2d
    csum 0x2d
    v951aeffa
    ~ld
    Chip ID: 276350
    
    ResetInfo.reason = 5: Deep-Sleep Wake
    .
    I'm awake.
    Going into deep sleep for 3 seconds
    
     ets Jan  8 2013,rst cause:2, boot mode:(3,6)
    
    load 0x4010f000, len 1384, room 16 
    tail 8
    chksum 0x2d
    csum 0x2d
    v951aeffa
    ~ld
    Chip ID: 276350
    
    ResetInfo.reason = 5: Deep-Sleep Wake
    .
    I'm awake.
    Going into deep sleep for 3 seconds
    
    

    Debug Messages ON NOT WORKING CHIP

    ets Jan  8 2013,rst cause:2, boot mode:(3,6)
    
    load 0x4010f000, len 1384, room 16 
    tail 8
    chksum 0x2d
    csum 0x2d
    v951aeffa
    ~ld
    Chip ID: 6198051
    
    ResetInfo.reason = 5: Deep-Sleep Wake
    .
    I'm awake.
    Going into deep sleep for 3 seconds
    
     ets Jan  8 2013,rst cause:2, boot mode:(3,6)
    
    

    Hangs/Freeze until power down, or hard reset (button from RESET to GND).

    Things we already try

    • Erase all flash memory using esptool.py
    • Changing firmware version from ESP CORE (2.0.0, 2.1.0, 2.4.0, 2.5.0)
    • Changing values of pullup resistors (10k, 4k7, 1k)
    • Using a stable protoboard 5v power bank
    • Connection from RESET to GPIO16 -Hardwire -RESISTOR 470, 1k, 10 -Using a diode, schottky -Adding aditional 10pF capacitor from RESET to GND

    Similar ISSUES

    #5892 #2768 https://github.com/universam1/iSpindel/issues/59

    Please HELP US!!! Can be a faulty batch?

  • [BUG]WEB Server reset module randomly (Watchdog Reset with Watchdog disabled)

    [BUG]WEB Server reset module randomly (Watchdog Reset with Watchdog disabled)

    Hi I am using staging module and I compile using 1.6.4 under windows 7 64bit I use ESP8266 01 to be a bridge between 3D printer and a web browser to get printer information, for this I do a request every 2 seconds to refresh the content of the web page and this make the module to reset randomly.

    it happens even watchdog is disabled ( between 10min to 8h) I open 2 web pages at once to make it happen faster if no pages open the module do not reset at least within 48h ( I did not tested longer) so currently can be String issue (but did not saw any memory leak) or Webserver issue but I do not know what to test

    Is it a known issue ? I there anything wrong in the code ? or anything that should be added to prevent module reset ?

    Thanks in advance

    I narrow down the minimal code using helloserver.ino to reproduce the problem (IP is harcoded to limit the usage of any function)

    #include <ESP8266WiFi.h>
    #include <WiFiClient.h>
    #include <ESP8266WebServer.h>
    
    const char* ssid = "dlink";
    const char* password = "****";//I remove my password
    
    ESP8266WebServer server(80);
    
    void handleRoot() {
      String message = "<HTML><BODY><H1>Page static</H1>";
      message += "<IFRAME  width=\"200\" height=\"200\"  NAME=\"frmstatus\"  ID=\"frmstatus\"  SRC=\"http://192.168.0.115/STATUS\"></IFRAME>\n<SCRIPT TYPE=\"text/javascript\">\n";
      message +="setInterval(function(){";
      message +="var ifrm=document.getElementById(\"frmstatus\");var doc=ifrm.contentDocument?ifrm.contentDocument:ifrm.contentWindow.document;";
      message +="doc.location.reload(true);";
      message +="},2000);\n";
      message +="</SCRIPT>\n</BODY></HTML>";
      server.send(200, "text/html", message);
    
    }
    
    void handleSubRoot() {
      static long cnta=0;
      static long cntb=0;
      cnta++;
      if(cnta>100000000)
      {
          cntb++;
          cnta=0;
      }
      String message = "<HTML>\n<BODY>\n<H1>refreshed page</H1>";
      message += String(cntb) + "/" + String(cnta);
      message +="</BODY>\n</HTML>\n";
      server.send(200, "text/html", message);
    
    }
    
    void setup(void){
      ESP.wdtDisable(); //enable or disable reset will happen 
      Serial.begin(115200);
      WiFi.begin(ssid, password);
      Serial.println("");
    
      // Wait for connection
      while (WiFi.status() != WL_CONNECTED) {
        delay(500);
        Serial.print(".");
      }
      Serial.println("");
      Serial.print("Connected to ");
      Serial.println(ssid);
      Serial.print("IP address: ");
      Serial.println(WiFi.localIP());
    
    
      server.on("/", handleRoot);
      server.on("/STATUS", handleSubRoot);
    
      server.begin();
      Serial.println("HTTP server started");
    }
    
    void loop(void){
      server.handleClient();
    } 
    
  • Fluctuating ADC with stabilized source

    Fluctuating ADC with stabilized source

    I supply the ADC with a stable voltage, supplied by a separate LM1117 3.3V with 100uF capacitor a resistor voltage divider. The LM1117 will provide 3.3V regardless of the load of the ESP's own voltage regulator, the capacitor takes away any noise and the 2 resistors make a fixed voltage suitable to be read by the ADC. (GND for both the ESP and the LM1117 are connected)

    Then, based on this article, I tried to add more stability to the readings: https://www.quora.com/Why-is-a-little-delay-needed-after-analogRead-in-Arduino So I do subsequent readings and only use the last one. I even do it 3 times instead of 2, and then only use the last one because that one is supposed to be stable.

    #define ANALOGPIN A0;
    ...
    analog = analogRead(ANALOGPIN);
    delay(1);
    analog = analogRead(ANALOGPIN);
    analog = analogRead(ANALOGPIN);
    Serial.print(F("Stablized Analog pin: "));
    Serial.println(analog);
    

    Readings are done and stored every minute.

    The ADC reading has 2 fluctuations, a slow drift and spikes. This show the ADC output: analogRead fluctuations

    This has been tested with the mentioned 'external' 3.3V regulator and with the 3.3V output from the ESP itself. I also tried with or without the subsequent readings. I don't really mind the spikes because I can add some code to flatten those, but the "long" wave-like fluctuation makes it all useless.

    (I need this to read an MQ135 sensor.)

    Using current core stable and Arduino IDE 1.6.9.

    Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

  • Automatic reboot after wdt reset

    Automatic reboot after wdt reset

    My boards crash from time to time and I do not know why. After such crash the wd reset shows up (boot mode:(1,6)), but the board does not restart automatically. How can I make the boards reset/restart automatically after a wdt reset?

    Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

  • Wemos d1 mini not waking up

    Wemos d1 mini not waking up

    Im trying a simple deepsleep sketch to use it in one of my projects but when the deepsleep ends, the led flashes once and nothing happens. how can i fix this?

    it sleeps because it doesnt print the deepsleep not working message but when its waking up, the led flashes once and nothing happens I connected GPIO 16 to rst

    i also debuged it with Serial.setDebugOutput(true);

    Debug Messages

    22:02:17.751 -> ets Jan 8 2013,rst cause:2, boot mode:(3,6) 22:02:17.751 -> 22:02:17.751 -> load 0x4010f000, len 1384, room 16 22:02:17.751 -> tail 8 22:02:17.751 -> chksum 0x2d 22:02:17.751 -> csum 0x2d 22:02:17.785 -> v8b899c12 22:02:17.785 -> ~ld 22:02:51.502 -> 22:02:51.502 -> ets Jan 8 2013,rst cause:2, boot mode:(3,6) 22:02:51.502 ->

    my code:

    #include <ESP.h>

    void setup() { Serial.begin(2400); Serial.setDebugOutput(true); }

    void loop() { // put your main code here, to run repeatedly: Serial.print("Uaaah. I'm tired. Going back to bed for "); Serial.println(" minutes. Good night!"); Serial.println("---"); ESP.deepSleep(20 * 1000000); delay(100); Serial.println("deepsleep not working"); }

  • WEMOS D1 mini Pro - 16M supporting

    WEMOS D1 mini Pro - 16M supporting

    Hardware

    Hardware: WEMOS D1 mini Pro - 16M

    What's new with D1 mini Pro

    • 16M bytes (128M bit) Flash
    • External antenna connector
    • Built-in ceramic antenna
    • New CP2104 USB-TO-UART IC
    • Same size as D1 mini, but more light

    View D1 mini Pro on WeMos Aliexpress store

  • Fix C builds

    Fix C builds

    Missing stdbool.h for 'bool' in features .h, at least one user is arduinoWebSockets

    Also noticed and removed default argument from crc32() in internal .h that may be used in .c (not sure how it worked at all, but at least in our .cpp Gcc somehow figured out it is a no overload solution)

    fix #8794

  • core_esp8266_features.h

    core_esp8266_features.h

    This issue is regard on your latest updates 2 days ago, before that update everything is Okay.

    In file included from c:\Users\abieg\OneDrive\Documents\Arduino\libraries\WebSockets\src\libb64\cdecode.c:9: C:\Users\abieg\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.0\cores\esp8266/core_esp8266_features.h:141:42: error: expected ',' or ';' before 'esp_is_8285' 141 | bool attribute((const, nothrow)) esp_is_8285(); | ^~~~~~~~~~~ C:\Users\abieg\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.0\cores\esp8266/core_esp8266_features.h:148:1: error: expected identifier or '(' before '}' token 148 | } | ^ In file included from c:\Users\abieg\OneDrive\Documents\Arduino\libraries\WebSockets\src\libb64\cencode.c:9: C:\Users\abieg\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.0\cores\esp8266/core_esp8266_features.h:141:42: error: expected ',' or ';' before 'esp_is_8285' 141 | bool attribute((const, nothrow)) esp_is_8285(); | ^~~~~~~~~~~ C:\Users\abieg\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.0\cores\esp8266/core_esp8266_features.h:148:1: error: expected identifier or '(' before '}' token 148 | } | ^

    exit status 1

    Compilation error: exit status 1

  • Reading GPIO16 on power up

    Reading GPIO16 on power up

    Basic Infos

    We are working on something that requires me to detect the state of GPIO16 inside user_rf_pre_init() - more specifically, in RF_PRE_INIT() in Arduino IDE.

    Platform

    • Hardware: ESP-12F
    • Core Version: 3.0.2
    • Development Env: Arduino IDE / NONOS_SDK
    • Operating System: MacOS

    Settings in IDE

    • Module: Nodemcu 1.0 (ESP-12E Module)
    • Flash Size: 4MB
    • lwip Variant: v2 Lower Memory
    • CPU Frequency: 160MHz
    • Upload Using: SERIAL
    • Upload Speed: 115200

    Problem Description

    We tried the following code, but it always returns me the same value:

    RF_PRE_INIT()
    {
      system_phy_set_powerup_option(2);
     
      GPIO_DIS_OUTPUT(GPIO_ID_PIN(16));
      int value = GPIO_INPUT_GET(GPIO_ID_PIN(16));
      GPIO_OUTPUT_SET(GPIO_ID_PIN(2), value );        //  Set LED based on state of Pin 16
    }
    

    We tried various APIs in NONOS_SDK, but none worked. For other GPIOs, we were able to do something like:

      PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDI_U, FUNC_GPIO12);     
          OR
      PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTMS_U, FUNC_GPIO14);
    

    before we setup the GPIO. But for GPIO16, there is no equivalent.

    We understand that GPIO16 is part of the RTC system and is handled differently but we cannot find the appropriate example or documentation on reading GPIO16.

    Help would be greatly appreciated!

    Joseph

  • DNS lookup problem

    DNS lookup problem

    Basic Infos

    • [ x ] This issue complies with the issue POLICY doc.
    • [ x ] I have read the documentation at readthedocs and the issue is not addressed there.
    • [ x ] I have tested that the issue is present in current master branch (aka latest git).
    • [ x ] I have searched the issue tracker for a similar issue.
    • [ x ] If there is a stack dump, I have decoded it.
    • [ x ] I have filled out all fields below.

    Platform

    • Hardware: [ESP-12]
    • Core Version: [3.0.2]
    • Development Env: [Arduino IDE]
    • Operating System: [Windows]

    Settings in IDE

    • Module: [Generic ESP8266 Module]
    • Flash Mode: [DOUT]
    • Flash Size: [4MB]
    • lwip Variant: [v2 Lower Memory]
    • Reset Method: [dtr]
    • Flash Frequency: [40Mhz]
    • CPU Frequency: [80Mhz]
    • Upload Using: [SERIAL]
    • Upload Speed: [115200]

    Problem Description

    I have a separate router and modem. After temporary data loss (modem disconnected, internet reconnection, etc), without WiFi connection loss ESP DNS cant solve any IP addresses.

    I have enabled the DEBUG level to WIFI.

    Sketch

    
    #include <ESP8266WiFi.h>
    
    const char* ssid     = "my-ssid";
    const char* password = "my-password";
    
    void setup() {
      Serial.begin(115200);
    
      Serial.println();
      Serial.println();
      Serial.print("Connecting to ");
      Serial.println(ssid);
    
      WiFi.mode(WIFI_STA);
      WiFi.begin(ssid, password);
    
      while (WiFi.status() != WL_CONNECTED) {
        delay(500);
        Serial.print(".");
      }
    
      Serial.println("");
      Serial.println("WiFi connected");
      Serial.println("IP address: ");
      Serial.println(WiFi.localIP());
    }
    
    void loop() {
      IPAddress ipResult;
      int result = WiFi.hostByName("www.google.com", ipResult);
      Serial.print("Result: "); Serial.println(result);
      Serial.print("Ip: "); Serial.println(ipResult);
      Serial.println();
      delay(5000);
    }
    
    

    Turn on the router WITHOUT DATA (modem connection), and start the ESP.

    The output, as expected, is this:

    [hostByName] request IP for: www.google.com
    [hostByName] Host: www.google.com lookup error: -5!
    Result: 0
    Ip: (IP unset)
    

    But after data reestablishing (connecting the router to the modem), ESP still cannot resolve the IP address.

    I know there is a DNS cache (I don't know exactly how long it lasts), but I left it running for 24 hours and the output remained the same.

    I tried some actions, like reconnecting to WiFi, but is only solves if I restart the device.

  • Is there a way to get Arduino IDE to pass --host_port (-p) to espota.py?

    Is there a way to get Arduino IDE to pass --host_port (-p) to espota.py?

    Discussed in https://github.com/esp8266/Arduino/discussions/8749

    Originally posted by sprior December 8, 2022 I recently set up a VLAN for my IOT devices so they live in a more secure network with a pfSense firewall between my development laptop and the devices. I am trying to restrict what port connections are allowed between the two networks. I have set up a MDNS bridge between the networks so in the Arduino IDE I can see the esp8266 devices as available network ports.

    What I have discovered is that the espota.py tool requires the esp8266 device to connect back to it on a host port and by default that port is random between 10000 and 60000. This works great when everything is on the same network, but in a firewall situation would require quite a large port range to be opened. espota.py does take a --host_port (-p) option to specify the port which seems promising, but I haven't found any way to configure the Arduino IDE to invoke espota.py with that option specified.

    As a temporary hack in the group.add_option("-P", "--host_port", section I replaced the default = random.randint(10000, 60000) with a default = but I dislike this option because it'll go away when I update.

    Is there anywhere less fragile where I could set this as a preference?

Arduino core for GD32 devices, community developed, based on original GigaDevice's core
Arduino core for GD32 devices, community developed, based on original GigaDevice's core

GD32 Arduino Core (New) This is a Arduino core is based off of the original GigaDevice core that was provided by the company in early June 2021 (see h

Dec 24, 2022
This project design to mine Duino-Coin using an Esp8266 as a master and Arduino as a slave.
This project design to mine Duino-Coin using an Esp8266 as a master and Arduino as a slave.

DuinoCoinI2C This project design to mine Duino-Coin using an Esp8266/Esp32 as a master and Arduino as a slave. Using the I2C communication to connect

Jan 3, 2023
Arduino and Nodemcu(esp8266)

Iot-based-project Using Arduino and Nodemcu(esp8266) We read temperature and humidity from DHT11 sensor with the help of ardunio uno and send that dat

Sep 25, 2021
json file config for ESP8266 arduino framework

Description Every project I have is the same architecture and appconf is one of the components I use every time. This is an attempt at making a public

Nov 9, 2021
ESP32 and ESP8266 Arduino wifi template

ESP wifi template ESP32 and ESP8266 Arduino wifi template Features Popular WiFI AP mode WiFI STA mode ETH mode DNS server for AP mode Async DDNS clien

Dec 14, 2022
ESP32, ESP8266 based MIDI Organ using the ML_SynthTools library (little example arduino project)
ESP32, ESP8266 based MIDI Organ using the ML_SynthTools library (little example arduino project)

esp32_esp8266_organ ESP32, ESP8266 based MIDI Organ using the ML_SynthTools library (little example arduino project) link to the video The required li

Dec 12, 2022
ESP32, ESP8266 based MIDI Organ using the ML_SynthTools library (little example arduino project)
ESP32, ESP8266 based MIDI Organ using the ML_SynthTools library (little example arduino project)

ml_synth_organ_example MIDI Organ using the ML_SynthTools library (little example arduino project) link to the video This project is an example suppor

Dec 12, 2022
Raspberry Pi Pico Arduino core, for all RP2040 boards
Raspberry Pi Pico Arduino core, for all RP2040 boards

Arduino-Pico Raspberry Pi Pico Arduino core, for all RP2040 boards This is a port of the RP2040 (Raspberry Pi Pico processor) to the Arduino ecosystem

Jan 5, 2023
Arduino Core for Deneyap DevKits
Arduino Core for Deneyap DevKits

Deneyap Kart Arduino Core FOR TURKISH VERSION Deneyap Kart, designed and manufactured in Turkey, is a powerful development board with its strong MCU,

Dec 19, 2022
Voltage Controlled Digital Core Multimode Oscillator using Mozzi library on Arduino

Arduino-VDCO Voltage Controlled Digital Core Multimode Oscillator using Mozzi library on Arduino Its a digital Oscillator/Voice for the Eurorack Stand

Dec 12, 2022
🖱️⌨️ Arduino Input Proxying for PC (.NET Core)
🖱️⌨️ Arduino Input Proxying for PC (.NET Core)

SerialProxy SerialProxy is a complete MiTM solution for modifying ??️ mouse & ⌨️ keyboard input against highly sophisticated FPS anti-cheats (ESEA/Fac

Apr 22, 2022
A Fingerprint Door Lock using a microprocessor named Arduino UNO and programming through Arduino IDE
A Fingerprint Door Lock using a microprocessor named Arduino UNO and programming through Arduino IDE

INSTRUCTIONS - The codes for the Fingerprint Door lock are present in the Code For Fingerprint Door Lock folder The instructions of how to operate the

Mar 3, 2022
Arduino M-BUS Master node for Arduino MKR M-BUS Shield
 Arduino M-BUS Master node for Arduino MKR M-BUS Shield

Arduino M-BUS Master node for Arduino MKR M-BUS Shield This software will read out a M-BUS device connected to an Arduino MKR board equipped with our

Nov 30, 2022
Sensirion Mass Flow Sensor Arduino library, modified from MyElectrons and Nabilphysics Arduino repositories for SFM3300 Digital Mass Flow Sensor
Sensirion Mass Flow Sensor Arduino library, modified from MyElectrons and Nabilphysics Arduino repositories for SFM3300 Digital Mass Flow Sensor

Sensirion Mass Flow Sensor Arduino library, modified from MyElectrons and Nabilphysics Arduino repositories for SFM3300 Digital Mass Flow Sensor. When the sensor data gets stuck, the library has a hard reset function to ensure that it is read continuously.

Apr 11, 2022
Internet of things created using arduino IoT cloud, consisting of esp and arduino boards

Internet of things created using arduino IoT cloud, consisting of esp and arduino boards. Goal of the project is to create a 3D printed RFID protected (with PIN) lock, including surveillance.

Sep 1, 2022
Web Server based on the Raspberry Pico using an ESP8266 with AT firmware for WiFi
Web Server based on the Raspberry Pico using an ESP8266 with AT firmware for WiFi

PicoWebServer This program runs on a Raspberry Pico RP2040 to provide a web server when connected to an Espressif ESP8266. This allows the Pico to be

Jan 7, 2023
Control Heidelberg Wallbox Energy Control over WiFi using ESP8266 and configure your own local load management
Control Heidelberg Wallbox Energy Control over WiFi using ESP8266 and configure your own local load management

< scroll down for English version and additional information > wbec WLAN-Anbindung der Heidelberg WallBox Energy Control über ESP8266 Die Heidelberg W

Jan 3, 2023
ESP8266 software USB host through general IO pins. We can connect up to 2 USB-LS HID (keyboard mouse joystick) devices simultaneously.
ESP8266 software USB host through general IO pins. We can connect up to 2 USB-LS HID (keyboard mouse joystick) devices simultaneously.

esp8266_usb_soft_host Test for esp8266 usb host . Works with ESP-IDF v3.4 80MHz and 160MHz. WorkInProgress Test run with mouse & combined mouse & keyb

Sep 1, 2022
Automated hydroponics with Home Assistant & ESP8266 controllers
Automated hydroponics with Home Assistant & ESP8266 controllers

ESPonics Automated hydroponics with ESP8266 microcontrollers & Home Assistant I absolutely want to credit Reddit user u/ghoofman for both the inspirat

Aug 27, 2022