Latest Espruino build for Esp8266

Posted on
Page
of 8
Prev
/ 8
Last Next
  • excellent!

  • The last build has been pretty stable, it seems. I just produced a new build with the latest mainline changes and a fix for neopixels at 160Mhz. This is my "release candidate" for v1.85: http://s3.voneicken.com/espruino/espruin­o_1v84.tve_master_74fc4d7_esp8266.tgz

    Changes:

    • Fixes neopixel timing given 160Mhz cpu clock (should work for 160 and 80 Mhz)
    • Pulls recent changes in mainline (not much affecting the esp8266)

    Links:

  • Alas yesterday's build had a couple of small bugs. Here's an updated build: http://s3.voneicken.com/espruino/espruin­o_1v84.tve_master_f35ac96_esp8266.tgz

    Changes:

    • Fixes socket recv error and http unsent data mistaken error

    Links:

  • @tve, did you have the time to test changes around E.memoryArea for this build ?

  • Nope, I haven't

  • After the firmware 1q84.tvemasterf35ac96 this code started working with failures, problem only with DHT module.
    In firmware 1v84.tvemaster363580f everything worked well.
    ESP-12q

    var dht = require("DHT22").connect(D4);
    
    var ds18 = require("DS18B20").connect(new OneWire(D5));
    
    I2C1.setup({sda:D12, scl:D14});
    var tsl = require('TSL2561').connect(I2C1);
    tsl.init(tsl.config.address.FLOAT,
             tsl.config.timing._402MS,
             tsl.config.gain._1X);
    
    var a = setInterval(function (){
      dht.read(function (a) { console.log("Temp is      ",a.temp,"  °C and RH is ",a.rh,"%");});
    
      ds18.getTemp(function (temp) { console.log("Temp is      ",temp,"°C");}, true);
    
      tsl.getLuminosity( tsl.config.spectrum.VISIBLE, 
           function (x) { print ("Luminosity is",x,"Lux"); }  
      );
    }, 3000);
    

    terminal window:

     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v84.tve_master_f35ac96 Copyright 2016 G.Williams
    WARNING: the esp8266 port is in beta!
    Flash map 4MB:512/512, manuf 0xe0 chip 0x4016
    >echo(0);
    =undefined
    Temp is       20.1   °C and RH is  18.4 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       20.1   °C and RH is  18.3 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       20.2   °C and RH is  18.3 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       20.2   °C and RH is  18.2 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       -1   °C and RH is  -1 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       -1   °C and RH is  -1 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       -1   °C and RH is  -1 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       -1   °C and RH is  -1 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       -1   °C and RH is  -1 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       -1   °C and RH is  -1 %
    Temp is       20.2   °C and RH is  18.2 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       20.2   °C and RH is  18.3 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    
  • Hello;
    Can anybody provide guidance as to the flash map, in terms of where to place the binaries, for a 1-Mbyte ESP module. I have several of these:
    http://wiki.iteadstudio.com/Wee_Serial_W­IFI_Module. They have the 25Q80 flash part mounted. After much flailing about I was able to program it as a 512-kbyte part. I am using the nodemcu flasher rather than the Python tool; this has never been a problem with the ESP-01. The first few attempts left me with a gibbering serial output that appeared to be dumping the memory. It was almost as if the preloaded AT firmware was still there in some vestigial form. After several misfires, changing the offsets, the Espruino 8266 binaries went in with all the default settings for the 1Mb/512kbyte part.
    Chris Z

  • @ChrisZ I am using this to flash 1MB ESP-01...

    ./esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_freq 80m --flash_mode qio --flash_size 8m 0x0000 "boot_v1.4(b1).bin" 0x1000 espruino_esp8266_user1.bin 0x37E000 blank.bin
    
  • Hello everyone,
    I tried to flash my nodeMCU chinese clone with a few firmwares:

    espruino_1v84.tve_master_74fc4d7_esp8266­
    espruino_1v84.tve_master_363580f_esp8266­
    espruino_1v84.tve_master_f35ac96_esp8266­

    but in every case the ide's console spits out a lot of garbage and the module seems to reboot every few seconds.
    I purchased it over aliexpress :
    link
    Is it a fw or hw problem ?

    I solved my problem reflashing over the saved data code area as per given instruction on the esp8266 page of espruino.

    Sorry for the noise...

  • @fuzzy try flashing it at 115200, I've found that usually works. Also dont have the espruino IDE connected when flashing with esptool.

  • Tanks @AlexOwen, I also think that my front panel USB3 port are not working properly, because when i connected the cable to the rear ports it stopped sending garbage on the console...

  • Builds are now available from the Espruino Download Page

    You can get up and running quickly:

    • Download esptool from here
    • Download the latest firmwares and unzip espruino_1vXX_esp8266_combined_512.bin
    • Put the ESP8266 into bootloader mode: use the flash button if there is one, or connect GPIO2 to 3.3v, and then power on your board (or reset it)
    • Run:

    ./esptool.py --port /dev/ttyUSB0 write_flash 0 espruino_1vXX_esp8266_combined_512.bin
    

    Replace /dev/ttyUSB0 with the communications port the ESP8266 is connected to.

    Note: If you have a non-512kB board (pretty much anything that's not an ESP01) then this won't be ideal as it's slower and you can't do OTA updates (see the next post) - however it should work and should get you started quite quickly. If you want to do it properly have to follow the real instructions.

  • If you use the above 512KB firmware on a module with a flash chip that is larger you will see a warning about the flash chip config being incorrect when you reset Espruino. You can ignore the warning, it's just telling you that the configuration you chose (512KB) doesn't match you flash chip.

    Also, the 512KB firmware will run with the flash chip configured to 40Mhz, while the flash chips larger than 512KB are (almost?) all capable of running at 80Mhz, so you will see some speed impact due to this (it's less than 2x, though). The complete flash instructions configure the flash chip to 80Mhz.

  • Hi,

    Is it possible to make clock stretching support for I2c communication.

  • Best to use the bug tracker for requests like this: https://github.com/espruino/Espruino

    However ESP8266 uses a software I2C implementation, so it should be possible to change it if you wanted.

  • Sure could be implemented, start here: https://github.com/espruino/Espruino/blo­b/a2fb33f01af8bc2a33f9d86a176eb18ecf5063­5a/targets/esp8266/jshardware.c#L882-L92­6
    What is a simple & cheap device that does clock stretching? I wouldn't know how to test it if I implemented it (one reason I didn't).

  • Wondering same - clock stretching is a rather uncommonly used feature of I2C.

  • Great work on this port! It works great so far. I'm building a solder reflow oven and it has worked out well. But now I want to build a web ui to control it. I can't use websockets as I get the error below. I'm on 1.85 from the download page on an ESP-12

    WARNING: Module "crypto" not found WARNING: Expecting a number or
    something iterable, got undefined WARNING: Expecting a number or
    something iterable, got undefined Uncaught Error: Field or method
    "SHA1" does not already exist, and can't create it on undefined at
    line 1 col 109
    ....toString(require("crypto").SHA1(f+"2­58EAFA5-E914-47DA-95CA-...

                              ^ in function called from system
    
  • @user63214 at the moment crypto is not part of the official build, some folks are working on this.

    watch https://github.com/espruino/Espruino/iss­ues/807

  • Hi, I've written the crypto module as js module, so you can in the esp...

    http://forum.espruino.com/conversations/­276175/?offset=25#comment12817146

  • @MaBe Will do! Thanks!

    @Wilberforce I was trying to do the same thing. Glad I saw your response before I spent all night hacking on it. Thanks a ton, that is a great solution for now.

    Looks like my ESP8266 / Espruino equipped reflow toaster will get a web ui tonight! :)

  • Thanks so much for this, I can confirm that it works on the WeMosD1 board, see pic of board (NOTE: I couldn't get NodeMcu working on this board!).

    esptool.py --port  /dev/tty.wchusbserial1410 --baud 9600 write_flash --flash_freq 80m --flash_mode qio --flash_size 32m  0x0000 "boot_v1.4(b1).bin" 0x1000 espruino_esp8266_user1.bin 0x37E000 blank.bin
    
    var wifi = require("Wifi");
    var http = require("http");
    
    wifi.connect("ssid",{password:"pwd"},fun­ction(err){
      console.log("connected: err:", err, ", IP:", wifi.getIP());
      http.createServer(function(req, res){
        res.writeHead(200, {'Content-Type': 'text/html'});
        res.write('Hello World');
        res.end();
      }).listen(80);
    });
    

    1 Attachment

    • Wemos_D1_ESP8266_Arduino_from_Tronixlabs_Australia_1__51632.1448405647.1280.1280.jpg
  • Hello all,

    Hmm seem to be having the some issue with garbage showing up on the console or prompt in the web ide. Flashed my Amica R2 esp8266 with no problems. But doesnt seem to be working:

    Connected

    rll|là| lì b|ìrb bònnlnnâì bpìlrlrlpònà l b nâ|lìlbònnîllnn lnrn âpònà rììììììì b nâ| lllì râ bònnî l`

    Any ideas or tips appreciated.

    Thanks
    Leo

  • What about the UART settings, for example baud rate?

  • Hello,

    Thanks for the reply, i double checked flashed with 115200 and also running the webIDE with 115200. On a putty telnet session its just a frozen prompt..

    regards,
    Leo

About

Latest Espruino build for Esp8266

Posted by Avatar for tve @tve

Actions