• I have a new development.. I've kept trying the same steps but for some reason it started working. I will try to re-create the steps and post back with another update. So what i recall to have done was

    1. Follow this article and downloaded this espruino_1v94.154_esp8266_4mb.tgz file.
    2. Tried to get an older boot1.4(b1).bin from a ESP8266 firmware - but this did not work and had the same issue.
    3. Went back to use the boot_v1.6.bin which was there in the original espruino package and used esptool.py to flash the ESP8266. I modified this slightly to mention --flash_size as 4MB instead of 32m (this comes as a warning, so i've modified that).
    4. Flash the ESP8266
      > esptool.py --port /dev/cu.SLAB_USBtoUART --baud 115200 erase_flash

    Important step here is to disconnect and re-connect the ESP8266 from the USB.

    1. Burn the downloaded image

    esptool.py --port /dev/cu.SLAB_USBtoUART --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

    1. Opened up Espruino IDE and connected to 1 of the 2 USBtoUART options that it always displays. And ran the sample code.

      var wifi = require("Wifi");
      wifi.connect("my-ssid", {password: "my-password"}, 
      function(err){if(err)console.log(err);el­se console.log("connected!");})
      

    and it started working. I am still testing out other APIs.. Another sample that i was able to do was

    This blinks the onboard LED ON and OFF every 500ms.

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

Avatar for swaroop @swaroop started