Sublime theme used: Boxy
uPiot is an experiment to make the work with uPython (micropython) a little bit easier. It uses an modified version of ampy called
sampy(Sublime + ampy) to comunicate with the device and pyserial to listen for changes. You can also burn the firmware direct from Sublime Text without any extra tool.
THIS PLUGIN IS IN ALPHA STATE, SO YOU MAY FIND SOME BUGS HANGING AROUND. HELP ME TO IMPROVING IT OPENING A ISSUE WITH YOUR REPPORT OR WITH A PR.
- Built-in fuction to burn MicroPython firmware.
- Manage your files in your device (get, list, run, make-remove, folders/files)
- Realtime output, even with loops
uPiot is not yet in the Package control, so you may need an extra step to install it.
- Go to
Preferences > Package Package Control > Add Repository
-
Press
ctrl+shift+por go toST Menu > Preferences > Package Controland select the optionPackage Control: Install Package -
Search for
upiotand install it.
Use the shortcut ctrl+alt+m to see all available uPiot options in the command menu.
Burn the firmware
-
From the command menu select
UPIOT: Download Firmware -
Go to http://micropython.org/download and copy the link of the
esp8266oresp32firmware (I've tried the plugin only in this boards) and paste it in the input panel in Sublime Text.
- It will start to download the file (you will see the download progress in the status bar)
- After the download is finished opens the command menu again and select
UPIOT: Burn Firmware.
-
Selects the serial port if it ask for one, the board used and the firmware previously downloaded.
-
You'll see the message
Do you want to erase the flash memory?, if it's your first time burning micropython, select yes.
When it is finished, you will be ready to use micropython in your device.
Using micropython
To use micropython opens the console with the option UPIOT: Open Console (from the command menu). In the input panel paste print("Hello world from uPiot"). If everything is fine you will see Hello world from uPiot
Micropython try to run
main.pyeach time your board is powered on (or reseted), when you don't have this file you will seeOSError: [Errno 2] ENOENT: main.pyin the output.
Make a new file and save it as main.py, writes print("Hello world from uPiot") on it and send it to your device with the command UPIOT: Put Current File (You can use UPIOT: Run Current File in case you want to test it first) after it finished, restart your board; the error won't be there and you should see the Hello world from uPiot in the output.
That are the current list of commands availables in the console.
Usage: sampy COMMAND [ARGS]
Note that if you don't write prefix 'sampy' in the console the string will be sent as a raw text to the device (with the
\r\nending)
List of options available in the command menu. (ctrl+alt+m)
At this moment, there is 4 importantant shorcuts:
ctrl+alt+mOpens the command menu to see all options availables in uPiotctrl+alt+oOpents the uPiot consolectrl+alt+rRuns the current filectrl+alt+pPuts the current filectrl+shift+cSends a cancel string to the open serial port (\x03)
I haven't test the shortcuts in all platforms, if you have any problem open a issue
Support the open source!. If you liked this plugin, and you want to make a contribution to continue its development, do it through this link. If you have any problems, or want to contact me: gepd@outlook.com
Copyright 2017 GEPD gepd@outlook.com
uPiot is licensed under MIT license. Read the full License file.
Note that may be some dependencies under a different license







