Close
0%
0%

Espruino Emulator

Espruino JavaScript interpreter for microcontollers, running in the browser

Similar projects worth following
Ever wanted to try developing some software for hardware, but don't have the hardware handy? This allows you to use the same Espruino IDE that you'd use to program real devices, but to run a complete instance of the Espruino interpreter (which would usually run on the microcontroller) inside the web browser and communicate with it just like you would real hardware.

Try it here:https://www.espruino.com/ide/emulator.html?codeurl=https://raw.githubusercontent.com/espruino/BangleApps/master/apps/blobclk/clock-blob.js

Click 'upload' in the middle of the screen to start the VM and upload the code to it. This is emulating a VM with a 240x240 screen, running https://banglejs.com/ code

Currently this emulates a JS interpreter with Graphics, and 2500 vars storage - similar to Bangle.js

There's some stuff that would be really neat though:

  • Support for emulating different types of board
  • Robot support! We could have a WebGL virtual world and an emulated robot controlled by the emulated Espruino

Very basic digital IO is done - you can play t-rex now! https://www.espruino.com/ide/emulator.html?codeurl=https://raw.githubusercontent.com/espruino/BangleApps/master/apps/trex/trex.js - so actually hooking on to this to do robots should be relatively easy

  • 1
    Building

    Ensure you have Emscripten installed: https://emscripten.org/docs/getting_started/downloads.html

    git clone https://github.com/espruino/EspruinoWebIDE
    git clone https://github.com/espruino/Espruino
    cd Espruino
    BOARD=EMSCRIPTEN RELEASE=1 make
    mv emulator_espruino.js ../EspruinoWebIDE/js/plugins/emulator_espruino.js
    
    

    Then open EspruinoWebIDE/emulator.html in a web browser

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates