• I am trying to just get something to work using my ESP8266 NodeMCU. I purchased one of these but I simply can't get it to work.

    I downloaded the 1v94 from the top of this page and extracted it to a folder. Then I ran this command:

    esptool --port COM4 --baud 115200 write_flash --flash_freq 80m --flash_mode qio --flash_size 4MB 0x0000 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin 0x3FC000 esp_init_data_default.bin 0x3FE000 blank.bin

    and after flashing, I run the esptool --port COM4 flash_id command, which returns:

    esptool.py v2.2
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Uploading stub...
    Running stub...
    Stub running...
    Manufacturer: e0
    Device: 4016
    Detected flash size: 4MB
    Hard resetting...

    But when I try to run some simple code like:

    var isOn = false;
    var interval = 500;
    function main() {
        setInterval(function () {
            isOn = !isOn;
            digitalWrite(D2, isOn);
        }, interval);

    it just won't do anything. My console says:

    Found a prompt... great!
    >>> Sending...
    ---> "\u0010reset();\n\u0010var isOn = false;\n\u0010var interval = 500;\n\u0010function main() {\u001b\n    setInterval(function () {\u001b\n        isOn = !isOn;\u001b\n        digitalWrite(D2, isOn);\u001b\n    }, interval);\u001b\n}\n\u0010main();\n\n"
    Splitting at "reset();\n", delay 250
    >>> Sent

    but nothing appears to be blinking. When I try the WiFi example code:

    var wifi = require("Wifi");
    function onConnect(err) {
        if(err) {
            console.log("An error has occured :( ", err.message);
        } else {
            console.log("Connected with IP : ", wifi.getIP().ip);
    wifi.connect("SSID", { password: "PASSWORD" }, onConnect);

    It gives me a Module Wifi not found and the console says:

    ERROR: getURL("https://www.espruino.com/modules­/Wifi.min.js") error : Not Found
    ERROR: getURL("https://www.espruino.com/modules­/Wifi.js") error : Not Found
    WARNING: [notify_warn] Module Wifi not found
    Found a prompt... great!
    >>> Sending...
    ---> "\u0010reset();\n\u0010Modules.removeAll­Cached();\n\u0010var wifi = require(\"Wifi\");\n\u0010function onConnect(err) {\u001b\n    if(err) {\u001b\n        console.log(\"An error has occured :( \", err.message);\u001b\n    } else {\u001b\n        console.log(\"Connected with IP : \", wifi.getIP().ip);\u001b\n    }\u001b\n}\n\u0010wifi.connect(\"SSID\",­ { password: \"PASSWORD\" }, onConnect);\n\n"
    Splitting at "reset();\n", delay 250
    >>> Sent

    What am I doing wrong here?

  • Did you set the baud rate in the IDE to 115200?

  • FIXED!

    I flashed the espruino_1v94_esp8266_4mb_combined_4096.­bin firmware instead. I simply did:

    esptool --port COM4 --baud 115200 write_blash --verify --flash_freq 80m --flash_mode dio --flash_size 32m 0x0000 espruino_1v94_esp8266_4mb_combined_4096.­bin

    Could probably be shortened a bit, but it works now!

    Wifi also works now :-)


ESP8266 12-E NodeMCU "Send to Espruino" doesn't seem to work

Posted by Avatar for MortenMoulder @MortenMoulder