We recently made some efforts to verify our commandline-driven MicroPython development environment on Linux, macOS and Windows.
We would like to outline some steps for a successful installation here. Please let us know about any obstacles you might encounter as it will indirectly help others by improving the documentation.
Install Linux on WSL for Windows10
Install Windows Subsystem for Linux (WSL) on on Windows 10 | Microsoft Docs
While other Linux distributions might work as well, we had good experiences with Ubuntu here.
Now you can launch Ubuntu or an other distro:
Install the development sandbox on Linux
See also: Hiveeyes MicroPython Datalogger setup.
We need some packages for our work:
apt update apt install make patch wget git python python3 python-virtualenv
2. Make or go to your working directory
cd /home mkdir cgruber cd cgruber
You should now have a prompt similar to
3. Acquire source code
First, let’s create a specific development folder called
"sources" directory and go there.
mkdir -p hiveeyes/sources cd hiveeyes/sources/
There, let’s clone the Git repository from GitHub and change into that folder.
git clone https://github.com/hiveeyes/hiveeyes-micropython-firmware cd hiveeyes-micropython-firmware/
In case you have this done a time ago and want to grab the latest version use
4. Configure your environment
Set your serial port with, in this case 16:
You can check if this was done allready with
5. Go to the firmware dir and run setup
root@XPS13-CGruber:/home/cgruber/hiveeyes/sources/hiveeyes-micropython-firmware# make setup
6. Edit your settings file
Finally make a local copy of your setting file for the LoPy or FiPy and edit your settins:
cp settings.example.py settings.py nano settings.py
(of cause you can use emacs or vim instead of nano also ;-)
7. Upload the code to the LoPy or FiPy with
Wie gewohnt kann mit
git status der lokale branch mit dem auf github verglichen werden und bei Bedarf mit
git pull die neueste Version heruntergeladen werden.