Skip to content

Web-based code editor (IDE) for MicroPython controllers with WiFi

License

Notifications You must be signed in to change notification settings

vsolina/micropython-web-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MicroPython web code editor / IDE

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

MicroPython Web IDE

Installation

  1. Flash a recent version (1.17+) of MicroPython to your Controller (https://micropython.org/download)
  2. 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
  1. Setup WebREPL (optional) On your Controller run:
import webrepl_setup
  1. 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
  1. Reboot Controller
  2. Open controller's IP in your browser (make sure to use https:// scheme - https not supported)
  3. Have a nice day

Install shell for MicroPython (optional)

For easier file system operations (mv, rm, mkdir, df, etc.) MicroPython shell - instructions on this page

Bundled open-source projects

This project would not be possible without these exceptional projects

Cloud9 Ace code editor

MicroWebSrv

MicroPython's WebREPL

And most importantly: MicroPython

Notes

  • 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)

About

Web-based code editor (IDE) for MicroPython controllers with WiFi

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published