MYOLIGHT™ is system of two components: a HDsEMG device featuring 32 electrodes and 28 single-differential channels, and a Python software package which provides live FFT visualisation of those 28 SD channels.
This repository contains code for the embedded front-end integrated with PlatformIO and Python software for the MYOLIGHT™ system.
The HDsEMG device runs on a Xiao ESP32C6 which requires the PlatformIO extension to run with Microsoft Visual Studio Code.
Installation instructions for PlatformIO can be found on their website, or installed via the extensions
tab on the left of VSC.
The ESP32C6 is currently not supported as a device on PlatformIO. Please follow Seeed Studio's instructions for how to use ESP32C6 on PIO.
The current repository you are in can be cloned into the project folder created by PlatformIO. You may need to adjust the platformio.ini
file to update the ESP32C6 drivers to its latest versions for compatibility,
but otherwise, compile and burn it onto the microcontroller! No extra setup is required.
TL;DR: clone, compile, and burn onto the ESP32C6! (make sure to follow instructions in the prerequisite
)
If you have cloned the repository, there will be a /PythonScripts/
folder containing various files.
Feel free to move it somewhere else; this is not required in the compilation process for the embedded software.
Go into /Python Scripts/dist
and you will find a myolight.exe
file. Download the file for MYOLIGHT™'s latest stable build.
A virtual environment is recommended before starting.
Run pip install -r requirements.txt
to install dependencies and launch the program using myolight.py
with python myolight.py
.
If changes are made to the python script and you want to rebuild the executable, run the build_exe.bat
file. This will automatically compile and generate a new myolight.exe
inside the /dist
folder.
Note that the GUI uses CTkinter
and is currently incompatible with Python 3.12.xx unless you modify the PATH
variable.
-
Begin by powering on the microcontroller (battery switch to the
ON
and2L
state) on the embedded device and connect to the Wi-Fi soft access pointESP32C6T-softAP
with the passwordqw12er34
.Do not fret, this password can be changed (if you are a power user). Look in
myolight-capture-device/include/COMMON_DEFS.h
and there will be a#DEFINE WIFI_PASSWORD "xxxxxx"
. The MYOLIGHT™ uses WPA2PSK encryption, so all your biodata is definitely safe with us👍. -
On successful connection to the
ESP32C6T-softAP
Wi-Fi, launchmyolight.exe
. This will bring up the interface:(The buttons are self-explanatory. They're even disabled for you not to randomly click and break things!)
-
Start with
Search and Connect
. If the terminal outputs an[ECHO]
message, you are good to go. If not, unlucky (to be fixed). -
Configure sampling parameters before hitting
Send Config
. An[ECHO]
will indicate the successful reconfiguration of the ADC and internal flags. -
Begin data collection with...
Start Data Collection
. This will launch another window:This is the FFT display of all 28 channels. Touch the electrode array to get a sense of electrode mapping. You'll get the hang of it, trust 😎.
-
Data collection can be stopped with
Stop Data Collection
which will...stop data collection! -
Analyse Data
can be ignored (in development).
See Issues (may not be addressed).
*Note that MYOLIGHT™ is not in any way commercial. The name and trademark (™) symbol is there as a jab against the MYOLINK. MYO-LIGHT being the "lightweight" version of the MYOLINK. It is as arbitrary as its creation.