logo elektroda
logo elektroda
X
logo elektroda

Compilation error in Arduino IDE for NodeMCU 1.0 (ESP-12E Module) - what to do?

pier 5046 11
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 15899513
    pier
    Level 24  
    Welcome.

    I haven't used an arduino so far and don't really know too much about what and how.
    I wanted to make a meteo station with there

    I already have an Arduino IDE with ESP8266 but with every attempt to verify/compile it throws an error:
    compilation terminated.
    exit status 1
    Error compiling for board NodeMCU 1.0 (ESP-12E Module).

    What is the issue?
  • ADVERTISEMENT
  • #2 15899604
    piotrva
    VIP Meritorious for electroda.pl
    Do you have a won slide for ESP?
    Is there anything in the console above this error?
    Are you using the same version of arduino and SDK for ESP as the Author of the code?
  • #3 15899691
    pier
    Level 24  
    1.I don't know what Support for ESP is
    2.Yes: C:C:Userspiotr\Desktop\Nweather-station-master\Nweather-station.ino:31:25: fatal error: ssd1306_i2c.h: No such file or directory

    #include "ssd1306_i2c.h"

    3.I don't know

    Added after 11 [minutes]:

    Well I embraced.
    I didn't install the libraries and the files were in the wrong place.

    Now I get this error when compiling:







    esp8266-weather-station:56: error: 'drawFrame1' was not declared in this scope

    void (*frameCallbacks[])(int x, int y) = {drawFrame1, drawFrame2, drawFrame3, drawFrame4};

    ^

    esp8266-weather-station:56: error: 'drawFrame2' was not declared in this scope

    void (*frameCallbacks[])(int x, int y) = {drawFrame1, drawFrame2, drawFrame3, drawFrame4};

    ^

    esp8266-weather-station:56: error: 'drawFrame3' was not declared in this scope

    void (*frameCallbacks[])(int x, int y) = {drawFrame1, drawFrame2, drawFrame3, drawFrame4};

    ^

    esp8266-weather-station:56: error: 'drawFrame4' was not declared in this scope

    void (*frameCallbacks[])(int x, int y) = {drawFrame1, drawFrame2, drawFrame3, drawFrame4};

    ^

    exit status 1
    'drawFrame1' was not declared in this scope
  • #4 15899885
    piotrva
    VIP Meritorious for electroda.pl
    1. The point is that you can select the ESP board in Arduino.
    4. The functions mentioned above are missing. See if they are not in the files somewhere.
  • ADVERTISEMENT
  • #5 15921777
    pier
    Level 24  
    I ran the Arduino IDE which finally started programming the ESP8266 correctly.
    I did what I needed to do.
    After a few days I wanted to program another ESP and the Arduino is already throwing errors.
    I'll add that I didn't change anything trying to upload exactly the same as before.
    These are the errors I get:


    In file included from c:\users\piotr\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\stdlib.h:18:0,

    from C:\piotrAppDataLocalArduino15packagesesp8266hardware2.3.0/ Arduino.h:27,

    from sketchesp8266-weather-station.ino.cpp:1:

    c:\users\piotr\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\sys\reent.h:14:24: fatal error: sys/_types.h: No such file or directory

    #include <sys/_types.h>

    ^

    compilation terminated.

    exit status 1
    Error compiling for board NodeMCU 1.0 (ESP-12E Module).
  • #6 15921943
    JacekCz
    Level 42  
    Surprising to incoming C/C++ compilers from other systems is the fact that not only something specific to the hardware, but everything important is changed after using the 'board'.

    E.g. selecting certain tiles is String suddenly has no c_str() method; This has nothing to do with the hardware, and should not be subject to change. Arduino has a bundling problem (naive as a little jaso), the way is completely unsuitable for such a "market success".
    And actually, it doesn't have a bundling problem because there is no bundling. It is an all in one ZIP, successful or not.
  • ADVERTISEMENT
  • #7 15922014
    pier
    Level 24  
    And is there any advice to get it working again?
  • #8 15922023
    JacekCz
    Level 42  
    pier wrote:
    new


    Again? Can you recall/recreate what was going on with the IDE?
    In the case I'm describing, String.c_str() is there again, as we switch to the previous tile.

  • ADVERTISEMENT
  • #9 15922277
    pier
    Level 24  
    Well, precisely nothing was happening with the IDE.
  • #10 15922777
    piotrva
    VIP Meritorious for electroda.pl
    You must have changed / updated something etc. - nothing happens without a cause. Maybe something not directly related to the Arduino.
  • #11 15923333
    pier
    Level 24  
    I had an infection which I removed with the rmnestha program.
    But after that I uninstalled the Arduino IDE and reinstalled it.
    The strange thing is also that after the reinstallation the arduino still remembers everything from before the uninstallation.
    Obviously this did not do anything.
  • #12 15923717
    piotrva
    VIP Meritorious for electroda.pl
    If you have viruses on your computer then, well, I'd start by getting to grips with finding a good anti-virus and effectively cleaning your computer / reinstalling your system. Otherwise you may experience random events involving your computer.

    And the Arduino stores files not only in Program Files - also in AppData and such - clear those folders too if you need to (you'll find somewhere on the Arduino website where and what it stores).
ADVERTISEMENT