Skip to content

VGkits' tools to connect to Micropython Vanguard Shell, reset, save and restore Vanguard firmware and other utility tasks.

License

Notifications You must be signed in to change notification settings

vgkits/vanguard-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VGkits' Vanguard Tools

The vgkits-vanguard package is published via Pip3 giving users simple short commands for configuring Vanguard boards and connecting to a Vanguard board's built-in python shell.

Run this pip3 command from a terminal to install the tools.

pip3 install vgkits-vanguard

If you don't yet have pip3, (which is installed as part of Python3) then follow these instructions to install it on your laptop.

See below for the commands you can run after the tools are installed.

shell : send python commands over USB

Connect to the python shell prompt on the Vanguard board over USB on Windows, MacOS or Linux, by running...

vanguard shell

This auto-detects the Vanguard's USB device and your operating system's Terminal configuration. Then it launches miniterm with the proper parameters to connect your terminal to the python shell.

brainwash : upgrade your board

After some experiments, you can wipe your Vanguard board to get a clean start by running...

vanguard brainwash

This is equivalent to vanguard brainwash vanguard to install latest Micropython plus VGkits' pre-installed libraries. However, you can use brainwash to wipe and install a different 'operating system' on your Vanguard board such as a clean Micropython build, CircuitPython, Espruino (to write code in Javascript) or Punyforth (to write code in the Forth language).

There are even Basic and LISP interpreters designed to run on this processor!

vanguard brainwash python - installs default python firmware (equivalent to vanguard brainwash micropython)

vanguard brainwash javascript - the default javascript firmware (equivalent to vanguard brainwash espruino)

vanguard brainwash lua - the default lua firmware (equivalent to vanguard brainwash nodemcu)

vanguard brainwash basic - the default basic firmware (equivalent to vanguard brainwash esp8266basic)

vanguard brainwash forth - the default forth firmware (equivalent to vanguard brainwash punyforth)

vanguard brainwash micropython - latest micropython release from the firmwares folder

vanguard brainwash circuitpython - latest circuitpython release from the firmwares folder

vanguard brainwash espruino - latest espruino release from the firmwares folder

vanguard brainwash esp8266basic - latest ESP8266Basic release from the firmwares folder

vanguard brainwash nodemcu - latest NodeMCU (eLua) release from the firmwares folder

vanguard brainwash punyforth - latest punyforth release from the firmwares folder. N.B. To connect to Punyforth try vanguard shell --line --echo --eol CRLF as per this issue

brainfreeze : back up the board's current configuration

After investing time in uploading libraries, writing and testing scripts on your board, you can save an 'image' of your operating system including any installed files by running...

vanguard brainfreeze

This creates a file brainfreeze.bin in the current folder. We suggest you rename this file to somethingelse.bin to help you remember the configuration you saved. Use that file to restore your board to the same configuration at a later time by running...

vanguard brainwash --input somethingelse.bin

put : upload main.py or python module

If there is a main.py file in the current working directory, you can upload it using...

vanguard put

If you wanted to put a module on the board, for example a the bmp180.py file to module to use a BMP180 pressure sensor, place the file in the current working directory, then run...

vanguard put bmp180.py

You will then be able to successfully import bmp180 from the Vanguard board, and run the example.

rm : remove main.py or python module

If you no longer want the main.py startup script, then run...

vanguard rm main.py

...and the Vanguard board will no longer run your script on powerup.

see : launch a file explorer

Every terminal has a 'current working directory', the folder it is currently using to create or find files. To see the contents of this folder, run...

vanguard see

...to open a graphical file explorer showing the current directory.

Use the terminal command cd (change directory) to change the directory by typing in different paths. For example cd Desktop will change the directory to a subfolder called Desktop.

Troubleshooting

The vgkits-vanguard Pypi package (installed via pip) should install a 'vanguard' command into a local folder, which can be run on Windows, Mac OS or Linux using just vanguard.

If for any reason vanguard is not available you can run instead...

python -m vgkits.vanguard

...or to force the use of Python3...

python3 -m vgkits.vanguard

If you encounter this issue, probably your path is not properly set up to include the files installed by pip3. Try following these instructions to fix it.

About

VGkits' tools to connect to Micropython Vanguard Shell, reset, save and restore Vanguard firmware and other utility tasks.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages