Web-based code editor for WiFi + MicroPython enabled microcontrollers
Uses Cloud9 Ace editor for code editing
Has an integrated WebREPL console
Developed and tested on ESP32, but should work on other boards too
- Flash a recent version (1.17+) of MicroPython to your Controller (https://micropython.org/download)
- Copy contents of /weditor and lib/microWebSrv.py to the root of Controller's file system
$ cd micropython-web-editor
$ ampy --port /dev/ttyUSB0 put weditor /weditor
$ ampy --port /dev/ttyUSB0 put lib /lib
- Setup WebREPL (optional) On your Controller run:
import webrepl_setup
- Update boot.py
print("Activating network")
import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect('YOUR_SSID', 'YOUR_PASS')
print("Starting webrepl")
import webrepl
webrepl.start()
print("Starting IDE web service")
import weditor.start
- Reboot Controller
- Open controller's IP in your browser (make sure to use https:// scheme - https not supported)
- Have a nice day
For easier file system operations (mv, rm, mkdir, df, etc.) MicroPython shell - instructions on this page
This project would not be possible without these exceptional projects
And most importantly: MicroPython
- File saving does not work well with large files yet
- This editor was mostly written and debugged using itself
- esp8266 does not have enough RAM to run all required components (yet)
- When using the IDE, Internet connection is required because Ace is hosted on cdnjs (to reduce storage requirements); but it's possible to bundle required ace.js files on Controller's flash (raise an Issue and I'll explain how to do it)