Skip to content

Instantly share code, notes, and snippets.

@LukasBombach
Last active July 2, 2024 13:18
Show Gist options
  • Save LukasBombach/49df6ce71740edc79612ca244d0926c4 to your computer and use it in GitHub Desktop.
Save LukasBombach/49df6ce71740edc79612ca244d0926c4 to your computer and use it in GitHub Desktop.
Flash diymore ESP32 LoRa with Espruino and show some text on its display

Things that are specific for the diymore ESP32 LoRa in combination with Espruino

  • You need to use this as a Generic ESP32 Device
  • You need to flash the device with a bootloader, partitions and the firmware
  • The baud is 115200

How to

  1. Find out your port
ls /dev/tty.*  
  1. Erase previous flash
esptool.py --port "YOUR_PORT" erase_flash
  1. Download required bins

Download the latest esp32 tgz espruino_XXX_esp32.tgz from http://www.espruino.com/binaries/travis/master/

  1. Flash device
esptool.py --chip esp32 --port "YOUR_PORT" --baud 115200 --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader.bin 0x8000 partitions_espruino.bin 0x10000 espruino_esp32.bin
  1. Set up the Espruino IDE
  1. Display some text on the device's screen
function start(){
 // write some text
 g.drawString("Hello World!",2,2);
 // write to the screen
 g.flip();
}


I2C1.setup({ scl: D15, sda: D4 });
var g = require("SSD1306").connect(I2C1, start, { rst: D16 });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment