• Does someone already tried to install Espruino on the Heltec/TTGO/Lolin/WEMS (or any of its dozen names) esp32 lora board?

    This board features:

    • an esp32 controller
    • a sx127x lora module
    • an OLED screen (don't know which model)
    • a cp2102 micro USB interface
    • a battery connector and charging circuit

    Ex: https://www.aliexpress.com/item/TTGO-LOR­A32-868-915Mhz-SX1276-ESP32-Oled-display­-Bluetooth-WIFI-Lora/32840222847.html

    The controller is an ESP32 so I guess that it's possible to flash it with Espruino but I'm not 100% sure...

  • Yes, have a couple of the Heltec boards with Lora 868/915 and one with just the Wifi Kit.

    Espruino generally works very well. With connected sensors, power sensitivity seems pretty fussy at times so see more reboots than I was expecting but otherwise able to get OLED, Lora, WiFi client all working well.

    Support for Wifi Base, Bluetooth and ESPNow are not yet functional as far as I can see.

    Example to use OLED:

     I2C1.setup({ scl: D15, sda: D4 });
     var g = require("SSD1306").connect(I2C1, startLogo, { rst: D16 });
  • Thanks @guycreate, I received my two TTGO boards and it was really easy to install Espruino on it.
    I started to play with it and it sounds really promising :)

    Do you know if it is possible to use the built in RST and PRG buttons with Espruino ?

    Here is the pin diagram of my board: https://ae01.alicdn.com/kf/HTB1V_aBbTnI8­KJjSszbq6z4KFXaH.jpg

    I don't know which pins correspond to these buttons :(

  • Answer to my own question: the RST button works perfectly with Espruino if you don't forget to call the "save" function to save your code in the board. Always read the doc...

  • Can U paste here, the lora connection code too? The oled is working for me. (but wifi connection is not with espruino version espruino 1v95)

    this is what is not working for me:

    SPI1.setup({ sck:D5, mosi:D27, miso: D19 });
    var sx = require("SX127x").connect({spi: SPI1, cs: D18, rst : D14 });
    setInterval(function() { sx.onIRQ(); }, 100);
    var config = {
      rxContinuous : true,
      bandwidth: 2
    // enter receive mode
    sx.rx(function(err, inf) {
      // Error, or you get signal strength and data returned in an object
      if (err) console.log("RX ERROR");
      else console.log("RX>",inf);
    // after a while, stop receiving
    setTimeout(function() {
    }, 10000);
    sx.send("Hello", function() {
      console.log("TX done");
  • Hey, pelase see the files attached at the end of this thread and tell me if they work for you. They are supposed to resolve the Wifi, and Bluetooth issues with the Heltec boards.


    Good luck :)


  • Thanks! I downloaded your binaries.

    Do you have example code for?

    • rx and tx with lora module
    • bluetooth

    Yesterday I successfully created a code to drive the oled, but with this espruino version I got this:

    >WARNING: jshI2CSetup: driver installed, sda: 4 sdl: 15 freq: 100000,
    ERROR: jshI2CWrite:, slave doesn't ACK the transfer.

    And the the code worked yesterday does not drive with this espruino version.

  • The RST pin is important in the Wifi Kit 32 board, I would assume it is in your case as well.

    function start () {
        // put your startup code here. 
    g = require("SSD1306").connect(I2C1, start,{rst: D16});

    There are a series of NRF classes in the reference documents, that I believe the ESP32 uses for Bluetooth. I'm not sure how much of it is fully complete as its a feature in development.

    I don't have a LoRa board, so I cannot help you with that one.

  • Okay, the reset pin was wrong. Now, its working thanks.

    Anybody have an espruino example code with lora on a helltech board?

  • Can u post here a lora example?

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Espruino on the Heltec/TTGO/Lolin/WEMS esp32 lora board

Posted by Avatar for Grumpf @Grumpf