From 3b9a117af0e519b92b1776a1b07640b90b5fe612 Mon Sep 17 00:00:00 2001 From: Alec Clews Date: Sat, 23 Jan 2021 14:18:03 +1100 Subject: [PATCH 1/7] Added a Powershell version of flash_micropython --- scripts/windows/flash_micropython.ps1 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 scripts/windows/flash_micropython.ps1 diff --git a/scripts/windows/flash_micropython.ps1 b/scripts/windows/flash_micropython.ps1 new file mode 100644 index 0000000..b79e913 --- /dev/null +++ b/scripts/windows/flash_micropython.ps1 @@ -0,0 +1,21 @@ + +if ([string]::IsNullOrEmpty($env:AMPY_PORT)) { + $env:AMPY_PORT = COM9 +} + +if ([string]::IsNullOrEmpty($env:BAUDRATE)) { + $env:BAUDRATE = 460800 +} + +if ([string]::IsNullOrEmpty($env:ESP32_MICROPYTHON)) { + $env:ESP32_MICROPYTHON = 'firmware/esp32-idf4-20191220-v1.12.bin' +} + + +echo "### Erase flash ###" +esptool.py-script.py --chip esp32 --port $env:AMPY_PORT erase_flash + +echo "### Flash microPython ###" +esptool.py-script.py --chip esp32 --port $env:AMPY_PORT --baud $env:BAUDRATE write_flash -z 0x1000 $env:ESP32_MICROPYTHON + +echo "### Complete ###" From 4810771886e0257be2787457dfcad439f557b10c Mon Sep 17 00:00:00 2001 From: Alec Clews Date: Wed, 27 Jan 2021 11:24:15 +1100 Subject: [PATCH 2/7] Initial support for PowerShell --- scripts/windows/flash_micropython.ps1 | 10 +++++----- scripts/windows/mpf_script.ps1 | 10 ++++++++++ 2 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 scripts/windows/mpf_script.ps1 diff --git a/scripts/windows/flash_micropython.ps1 b/scripts/windows/flash_micropython.ps1 index b79e913..2324a5d 100644 --- a/scripts/windows/flash_micropython.ps1 +++ b/scripts/windows/flash_micropython.ps1 @@ -1,21 +1,21 @@ if ([string]::IsNullOrEmpty($env:AMPY_PORT)) { - $env:AMPY_PORT = COM9 + $env:AMPY_PORT = 'COM9' } if ([string]::IsNullOrEmpty($env:BAUDRATE)) { - $env:BAUDRATE = 460800 + $env:BAUDRATE = '460800' } if ([string]::IsNullOrEmpty($env:ESP32_MICROPYTHON)) { - $env:ESP32_MICROPYTHON = 'firmware/esp32-idf4-20191220-v1.12.bin' + $env:ESP32_MICROPYTHON = './esp32-idf4-20191220-v1.12.bin' } echo "### Erase flash ###" -esptool.py-script.py --chip esp32 --port $env:AMPY_PORT erase_flash +py $env:VIRTUAL_ENV\Scripts\esptool.py-script.py --chip esp32 --port $env:AMPY_PORT erase_flash echo "### Flash microPython ###" -esptool.py-script.py --chip esp32 --port $env:AMPY_PORT --baud $env:BAUDRATE write_flash -z 0x1000 $env:ESP32_MICROPYTHON +py $env:VIRTUAL_ENV\Scripts\esptool.py-script.py --chip esp32 --port $env:AMPY_PORT --baud $env:BAUDRATE write_flash -z 0x1000 $env:ESP32_MICROPYTHON echo "### Complete ###" diff --git a/scripts/windows/mpf_script.ps1 b/scripts/windows/mpf_script.ps1 new file mode 100644 index 0000000..8d1c6b8 --- /dev/null +++ b/scripts/windows/mpf_script.ps1 @@ -0,0 +1,10 @@ + +if ([string]::IsNullOrEmpty($env:AMPY_PORT)) { + $env:AMPY_PORT = 'COM9' +} + +$MPF_SCRIPT = $args[0] + + + +py $env:VIRTUAL_ENV\Scripts\mpfshell-script.py --reset -o $env:AMPY_PORT -s $MPF_SCRIPT From d8b6e0a91fa30e718868319b46dd989815da1602 Mon Sep 17 00:00:00 2001 From: Alec Clews Date: Wed, 27 Jan 2021 11:52:00 +1100 Subject: [PATCH 3/7] Updated install instructions 1. Change to atx headings instead of Setext 2. Remove anchors -- not needed 3. Updated install instructions a. Changed the order of doing things to be more logical b. Added more detail about downloading micropython c. Updated virtual env setup to use current Python `venv` tool d. Added info about PowerShell example scripts e. Add image from Windows device Manager --- ReadMe.md | 96 +++++++++++++++++------------ Windows-Device-Manager-Example.png | Bin 0 -> 3101 bytes 2 files changed, 58 insertions(+), 38 deletions(-) create mode 100644 Windows-Device-Manager-Example.png diff --git a/ReadMe.md b/ReadMe.md index 80d851f..61cf031 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,21 +1,16 @@ -Aiko Engine MP ([microPython](http://micropython.org)) -============== +# Aiko Engine MP ([microPython](http://micropython.org)) + +## Contents -Contents --------- - [Overview](#overview) - [Installation](#installation) - [Resources](#resources) - -Pages ------ +## Pages - [Contributors](Contributors.md) - [Software license](License) - +## Overview -Overview --------- The Aiko Engine MP provides ... - Modular [microPython](http://micropython.org) based framework @@ -30,57 +25,82 @@ The Aiko Engine MP provides ... - Supports [LCA2017 IoTuz project](http://www.openhardwareconf.org/wiki/OHC2017) - Tested on a range of ESP32 development boards - +## Installation + +Installation is a three stage process: + +1. Setup the correct tooling on your workstation +2. Download and install MicroPython onto your ESP32 development board +3. Install the Aiko software onto your ESP32 development board -Installation -------------- +### SETUP + +- Make sure you have a current version of [Python3](https://www.python.org/) available on your workstation + +- Download the Aiko software code from https://github.com/geekscape/aiko_engine_mp -- Download the source code from ``` git clone https://github.com/geekscape/aiko_engine_mp cd aiko_engine_mp ``` -- Ensure you have a - [compatible hardware board](https://github.com/micropython/micropython/wiki/Boards-Summary) or - [compatible microPython port](https://github.com/micropython/micropython/tree/master/ports) -- Make sure you have a Python - [virtual environment](http://docs.python-guide.org/en/latest/dev/virtualenvs/#lower-level-virtualenv) set-up, including - [virtualenvwrapper](http://docs.python-guide.org/en/latest/dev/virtualenvs/#virtualenvwrapper) -- Create `mkvirtualenv micropython` and work on the new virtual environment -``` - workon micropython -``` -- Install mpfshell + + Note: If you don't have Git installed you download a zip file from https://github.com/geekscape/aiko_engine_mp + +- Setup a [virtual Python environment](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment) for your badge project + +- Make sure your Python virtual environment is active + +- Install Python packages [`esptool`](https://github.com/espressif/esptool/blob/master/README.md) and [`mpfshell`](https://github.com/wendlers/mpfshell/blob/master/README.md) ``` pip install esptool pip install -U mpfshell ``` -- Plug in your ESP32 device and make sure you can see it, - e.g `ls /dev/tty.*` provides e.g `/dev/tty.wchserial1410` -- Export the serial port to an environment variable, so mpfshell can use it, - e.g `export AMPY_PORT=` where `port` is the device address shown - by the `ls` command above -- Download latest [microPython](http://micropython.org/download) -- Flash microPython + +Note: For `mpfshell` (version v0.9.1 and earlier) on Mac OS X or Windows, this +problem may be fixed via this [patch](https://github.com/wendlers/mpfshell/commit/52b0636c82b06a07daa5731550f86b0d7ebc7608). You may find it easier to install `mpfshell` +manually from the [source](https://github.com/wendlers/mpfshell/blob/master/README.md#from-source) + +### Download and install MicroPython + +- Download the latest MicroPython binary for your ESP32 boardfrom https://micropython.org/download/ + + Note that you must have a + [compatible hardware board](https://github.com/micropython/micropython/wiki/Boards-Summary) or + [compatible microPython port](https://github.com/micropython/micropython/tree/master/ports) + + +- Plug in your ESP32 device and make sure you can see it. For example on + - macOS or Linux: + `ls /dev/tty.*` provides something similar to `/dev/tty.wchserial1410` + - On Windows, use the device manager to discover the COM port + +![Example of using the Windows Device manager](/Windows-Device-Manager-Example.png) + +- Export the serial port to an environment variable, so `mpfshell` can use it, + e.g `export AMPY_PORT=` or `$env:AMPY_PORT = ` where `port` is the device address shown + by the `ls` command above, or in the Windows device manager +- Flash microPython. Helper scripts are provided + ``` ./scripts/flash_micropython.sh + .\scripts\windows\flash_micropython.ps1 ``` + +### Install the Aiko software + - Run the Aiko Engine MP flash script + ``` ./scripts/mpf_script.sh ./scripts/aiko.mpf + .\scripts\windows\mpf_script.ps1 scripts\aiko.mpf ``` Note: For Lolin32-Lite boards, the serial port can be notoriously problematic and requires a slight delay in order for the connection to occur properly. If you're seeing errors that look like `Could not enter raw repl` then this is probably related. -For `mpfshell` (version v0.9.1 and earlier) on Mac OS X or Windows, this -problem may be fixed via this [patch](https://github.com/wendlers/mpfshell/commit/52b0636c82b06a07daa5731550f86b0d7ebc7608) - - +## Resources -Resources ---------- Associated open-source ESP32 hardware projects ... - [OHMC team's](https://twitter.com/swagbadge2021) - diff --git a/Windows-Device-Manager-Example.png b/Windows-Device-Manager-Example.png new file mode 100644 index 0000000000000000000000000000000000000000..fd229d2549c1ae5aeaec7a0d473af9c557f72248 GIT binary patch literal 3101 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 literal 0 HcmV?d00001 From 7a5205c81b22826a55a2e1b742dc0f017375145b Mon Sep 17 00:00:00 2001 From: Alec Clews Date: Thu, 28 Jan 2021 06:30:16 +1100 Subject: [PATCH 4/7] Improve docs * Added suggestions by @garthk -- thanks * Updated for mpfshell 0.9.2 1. Added requirements file with correct version of mpfshell 2. More help on venv for novices 3. Added more details and links --- ReadMe.md | 54 +++++++++++++++++++++++++++++++----------------- requirements.txt | 2 ++ 2 files changed, 37 insertions(+), 19 deletions(-) create mode 100644 requirements.txt diff --git a/ReadMe.md b/ReadMe.md index 61cf031..2081f93 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -33,7 +33,12 @@ Installation is a three stage process: 2. Download and install MicroPython onto your ESP32 development board 3. Install the Aiko software onto your ESP32 development board -### SETUP +**Notes**: + +* If you are using Linux or macOS then you will be using a Posix shell (e.g. [Bash](https://www.gnu.org/software/bash/) or [zsh](http://zsh.sourceforge.net/)) +* If you are on Windows then we assume you are using [PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/overview) + +### 1. Setup - Make sure you have a current version of [Python3](https://www.python.org/) available on your workstation @@ -41,44 +46,55 @@ Installation is a three stage process: ``` git clone https://github.com/geekscape/aiko_engine_mp +``` +**Note**: If you don't have Git installed you can download a zip file from https://github.com/geekscape/aiko_engine_mp and unpack it + + +``` cd aiko_engine_mp ``` - Note: If you don't have Git installed you download a zip file from https://github.com/geekscape/aiko_engine_mp +**Note**: All commands below assume that `.../aiko_engine_mp` is your current directory. -- Setup a [virtual Python environment](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment) for your badge project -- Make sure your Python virtual environment is active +- Setup a [virtual Python environment](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment) for your badge project. e.g. -- Install Python packages [`esptool`](https://github.com/espressif/esptool/blob/master/README.md) and [`mpfshell`](https://github.com/wendlers/mpfshell/blob/master/README.md) ``` - pip install esptool - pip install -U mpfshell +python3 -m venv .venv ``` -Note: For `mpfshell` (version v0.9.1 and earlier) on Mac OS X or Windows, this -problem may be fixed via this [patch](https://github.com/wendlers/mpfshell/commit/52b0636c82b06a07daa5731550f86b0d7ebc7608). You may find it easier to install `mpfshell` -manually from the [source](https://github.com/wendlers/mpfshell/blob/master/README.md#from-source) +- Make sure your Python virtual environment is active. **Note**: Do this every time a new terminal session is started -### Download and install MicroPython +``` +. .venv/bin/activate # Linux and macOS +. .venv\Scripts\activate.ps1 # Windows +``` -- Download the latest MicroPython binary for your ESP32 boardfrom https://micropython.org/download/ +- Install Python packages [`esptool`](https://github.com/espressif/esptool/blob/master/README.md) and [`mpfshell`](https://github.com/wendlers/mpfshell/blob/master/README.md) + +``` +pip install -r requirements.txt +``` + +### 2. Download and install MicroPython + +- Download the latest MicroPython binary for your ESP32 board from https://micropython.org/download/ Note that you must have a [compatible hardware board](https://github.com/micropython/micropython/wiki/Boards-Summary) or [compatible microPython port](https://github.com/micropython/micropython/tree/master/ports) - - Plug in your ESP32 device and make sure you can see it. For example on - macOS or Linux: `ls /dev/tty.*` provides something similar to `/dev/tty.wchserial1410` - - On Windows, use the device manager to discover the COM port + - On Windows, use the [device manager](https://support.microsoft.com/en-us/windows/open-device-manager-a7f2db46-faaf-24f0-8b7b-9e4a6032fc8c) to discover the COM port ![Example of using the Windows Device manager](/Windows-Device-Manager-Example.png) -- Export the serial port to an environment variable, so `mpfshell` can use it, +- Export the serial port to an environment variable, so helpder sripts can use it, e.g `export AMPY_PORT=` or `$env:AMPY_PORT = ` where `port` is the device address shown - by the `ls` command above, or in the Windows device manager + by the `ls` command above, or in the Windows device manager. **Note**: Do this every time a new terminal session is started + - Flash microPython. Helper scripts are provided ``` @@ -86,13 +102,13 @@ manually from the [source](https://github.com/wendlers/mpfshell/blob/master/READ .\scripts\windows\flash_micropython.ps1 ``` -### Install the Aiko software +### 3. Install the Aiko software - Run the Aiko Engine MP flash script ``` - ./scripts/mpf_script.sh ./scripts/aiko.mpf - .\scripts\windows\mpf_script.ps1 scripts\aiko.mpf + ./scripts/mpf_script.sh ./scripts/aiko.mpf # Linux or macOS + .\scripts\windows\mpf_script.ps1 .\scripts\aiko.mpf # Windows ``` Note: For Lolin32-Lite boards, the serial port can be notoriously problematic diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..633806f --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +mpfshell==0.9.2 +esptool From 023bd296d155ed5d9fb557494007f1a98c7bfc18 Mon Sep 17 00:00:00 2001 From: Alec Clews Date: Thu, 28 Jan 2021 06:51:56 +1100 Subject: [PATCH 5/7] Windows -- remove device manger and add chgport command --- ReadMe.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 2081f93..41802f8 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -31,12 +31,12 @@ Installation is a three stage process: 1. Setup the correct tooling on your workstation 2. Download and install MicroPython onto your ESP32 development board -3. Install the Aiko software onto your ESP32 development board +3. Install the Aiko software onto your ESP32 development board. **Notes**: * If you are using Linux or macOS then you will be using a Posix shell (e.g. [Bash](https://www.gnu.org/software/bash/) or [zsh](http://zsh.sourceforge.net/)) -* If you are on Windows then we assume you are using [PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/overview) +* If you are on Windows then we assume you are using [PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/overview) on Windows 10. ### 1. Setup @@ -87,13 +87,11 @@ pip install -r requirements.txt - Plug in your ESP32 device and make sure you can see it. For example on - macOS or Linux: `ls /dev/tty.*` provides something similar to `/dev/tty.wchserial1410` - - On Windows, use the [device manager](https://support.microsoft.com/en-us/windows/open-device-manager-a7f2db46-faaf-24f0-8b7b-9e4a6032fc8c) to discover the COM port - -![Example of using the Windows Device manager](/Windows-Device-Manager-Example.png) + - On Windows, use the command `chgport /query` to discover the COM port. - Export the serial port to an environment variable, so helpder sripts can use it, - e.g `export AMPY_PORT=` or `$env:AMPY_PORT = ` where `port` is the device address shown - by the `ls` command above, or in the Windows device manager. **Note**: Do this every time a new terminal session is started + e.g `export AMPY_PORT=` or `$env:AMPY_PORT = COM` where `port` is the device address shown + by the `ls` command above, or `COM` is the port show by the command `chgport` above. **Note**: Do this every time a new terminal session is started - Flash microPython. Helper scripts are provided From f49fd492734a07e8c258a35e765ed19d84db1daf Mon Sep 17 00:00:00 2001 From: Alec Clews Date: Thu, 28 Jan 2021 11:14:49 +1100 Subject: [PATCH 6/7] Update command chgprt to change port --- ReadMe.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 41802f8..f33228e 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -87,11 +87,11 @@ pip install -r requirements.txt - Plug in your ESP32 device and make sure you can see it. For example on - macOS or Linux: `ls /dev/tty.*` provides something similar to `/dev/tty.wchserial1410` - - On Windows, use the command `chgport /query` to discover the COM port. + - On Windows, use the command `change port /query` to discover the COM port. - Export the serial port to an environment variable, so helpder sripts can use it, e.g `export AMPY_PORT=` or `$env:AMPY_PORT = COM` where `port` is the device address shown - by the `ls` command above, or `COM` is the port show by the command `chgport` above. **Note**: Do this every time a new terminal session is started + by the `ls` command above, or `COM` is the serial port show by the command `change port` above. **Note**: Do this every time a new terminal session is started - Flash microPython. Helper scripts are provided From 13c1568c4defcc294b5cdec6a744ffced645a2a8 Mon Sep 17 00:00:00 2001 From: Alec Clews Date: Sat, 30 Jan 2021 14:05:39 +1100 Subject: [PATCH 7/7] Added additonal setup notes --- ReadMe.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ReadMe.md b/ReadMe.md index f33228e..427825f 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -76,6 +76,16 @@ python3 -m venv .venv pip install -r requirements.txt ``` +**Notes**: + +1. Some environments may need to install additional tools and libraries. e.g. on Debian or Ubuntu + +``` +sudo apt-get install -y libpython3-dev libffi-dev libssl-dev +``` + +2. You might find it useful to install an MQTT client for later use. There are packages [here](https://hivemq.github.io/mqtt-cli/docs/installation/packages.html). + ### 2. Download and install MicroPython - Download the latest MicroPython binary for your ESP32 board from https://micropython.org/download/