B4R Question ESP8266

Discussion in 'B4R Questions' started by Michael1968, Apr 11, 2016.

  1. Michael1968

    Michael1968 Active Member Licensed User

    Hi Erel,

    i want to upload a blink example to my ESP8266

    I get this error:
    I use a Adafruit Huzzah and a Nodemcu V1.0

    Best regards
    Michael
     
  2. Toley

    Toley Active Member Licensed User

    I have also tried with a NodeMCU and it do not work.

     
  3. Erel

    Erel Administrator Staff Member Licensed User

    I've haven't yet tested B4R with ESP board. I'm waiting for my board to arrive.

    This specific error can be solved by commenting line 54 in libraries\rCore\B4RArduino.cpp
     
    Toley likes this.
  4. Toley

    Toley Active Member Licensed User

    Thanks Erel, after commenting line 54, the program can be compiled and load into the board. but the I constantly receive a message on the Log (every seconds I guess)
    Anyway I will wait for you to receive your board and make your own test. Thanks a lot.
     
  5. Moch Firmansyah

    Moch Firmansyah Member Licensed User

  6. Michael1968

    Michael1968 Active Member Licensed User

    Hi Erel,

    did you receive your board???

    Best regards
    Michael
     
  7. Erel

    Erel Administrator Staff Member Licensed User

  8. Toley

    Toley Active Member Licensed User

    Hi Erel, the examples that come from this library are working very fine. I don't have the exact same shield as you but it works with an ESP8266-12 and a Node-MCU who holds the same chip as yours (ESP8266-12E).

    https://github.com/esp8266/Arduino
     
    Michael1968 likes this.
  9. canalrun

    canalrun Well-Known Member Licensed User

    I would also be interested in seeing ESP8266 support in B4R. I have a WeMos D1 R2 (WeMos D1 R2 WiFi ESP8266 Development Board Compatible Arduino UNO).

    The board offers much more memory and runs at 80 MHz, I think, and it's cheap. Although, it may lack some features of the Arduino.

    I've actually hardly looked at the board, but I think it may make a great updated platform for things similar to what the Arduino can do.

    Barry.
     
    devpialkt likes this.
  10. Erel

    Erel Administrator Staff Member Licensed User

    I've ordered it now...
     
  11. rwblinn

    rwblinn Well-Known Member Licensed User

  12. viriato

    viriato Member Licensed User

    Hi,
    This will be great if you can support ESP8266 , it will be a big step for IoT and supporting MQTT

    Thanks
     
    Michael1968 likes this.
  13. billzhan

    billzhan Active Member Licensed User

    Wemos D1 R2
     
  14. tirpitz

    tirpitz New Member Licensed User

    Success with Blink
    had to add one line at 79 in rCore/Scheduler.cpp before pollers.runAll();

    yield(); //avoid watchdog reset
    pollers.runAll();
     
    Erel likes this.
  15. tirpitz

    tirpitz New Member Licensed User

    success also with Serial output.
    Here is my changes in rCore/B4RArduino.cpp line 48 -> 58

    #ifdef B4R_SERIAL
    stream.wrappedStream = &::Serial;
    // #ifdef _VARIANT_ARDUINO_DUE_X_
    ::Serial.begin(BaudRate);
    /* #else
    ::Serial.begin(BaudRate, Config);
    #endif
    while (!::Serial) {
    ;
    }

    */
     
    inakigarm likes this.
  16. inakigarm

    inakigarm Well-Known Member Licensed User

    @tirpitz , what kind of ESP8266 device are you testing? (esp8266-1,esp8266-12,NodeMCU, ...) ?
     
  17. tirpitz

    tirpitz New Member Licensed User

    Attached Files:

    inakigarm likes this.
  18. rwblinn

    rwblinn Well-Known Member Licensed User

    Curious: How is this board integrated in the Arduino IDE and is the board also listed in B4R Board Selector?

    Reason for asking:
    Added ESP8266 Boards into the Arduino IDE 1.6.8 using "http://arduino.esp8266.com/stable/package_esp8266com_index.json" (Additional Board Manager URLs field).
    But when opening the B4R Board selector, these additional boards are not listed.

    Probably should start a new thread for this.
     
  19. Erel

    Erel Administrator Staff Member Licensed User

    I'll explain. B4R tries to extract the list of boards from Arduino IDE.

    During the beta there were cases where this step failed for (currently) unknown reason. The workaround is to provide a static list of boards when it fails. The list is stored in boards.txt in the installation folder.

    You can replace the file with the one attached. It includes the ESP boards.
     

    Attached Files:

    devpialkt, max123 and maXim like this.
  20. rwblinn

    rwblinn Well-Known Member Licensed User

    Thanks = Done.
    Steps taken:
    • Attached & selected board NodeMCU v1.0 with upload speed 115200.
    • Changed core library scheduler.cpp as stated in post #14.
    • Changed core library B4RArduino.cpp by commenting out lines 50 and 52-54.
    • Got the Blink Example working on a LED connected to pin D2 which is GPIO4 of the NodeMCU. In B4R defined as Private LEDPinNumber As Byte = 0x04

    Followup question:
    Is it possible to add as permanent fix in B4R, an additional conditional define for the ESP8266 for core lib B4RArduino.cpp? or any hint if this can be done via B4R code.
    I am not sure, not tested yet, as the changes will also work for the Arduino boards.

    Appreciated
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice