- First time firmware upload instructions
- Update firmware instructions
- Other Documentation
- Firmware information
This method is easier/faster. It uses esptool.py.
Download the bin files:
- Download the .bin files located at the bin folder
Download esptool.py:
- Download the esptool.py from https://github.com/espressif/esptool. Use the
Download ZIP
option from Github- Unzip the esptool-master.zip file
Download mkspiffs tool:
- Download the mkspiffs tool. Download the latest version for the ESP32 according to your OS at the release page
- Extract the file
- Copy the data folder to the mkspiffs folder
- Edit the
/data/config.json
file for the information to match yout T-Stick (serial number, firmware version, color, etc.)
- Open a Terminal window (macOS/Linux) or the Command Prompt (Windows)
- Navigate to the mkspiffs folder
- Execute
./mkspiffs -c data -d 5 -b 4096 -p 256 -s 1507328 esp32_arduino_19X_19111.spiffs.bin
(macOS/Linux) ormkspiffs.exe -c data -d 0 -b 4096 -p 256 -s 1507328 esp32_arduino_19X_19111.spiffs.bin
(Windows)
- Check the T-Stick (ESP32) port in your computer:
- For MacOS/Linux:
- Open a Terminal window
- Execute the command
ls /dev/cu.*
. The command will return a list of ports in your computer.- Plug the T-Stick (USB) and run the command
ls /dev/cu.*
one more time. You can now compare the lists and anotate the T-Stick USB port. Should be something similar to/dev/cu.wchusbserial1410
, probably with a different number- Linux users should also give the currently logged user read and write access the serial port over USB. Check here for more information
- For Windows:
- Check the list of identified COM ports in the Windows Device Manager
- Plug the T-Stick (USB) and check the list of identified COM ports in the Windows Device Manager again. The T-Stick port should appear on the list. Anotate the T-Stick USB port, it should be something similar to
COM3
orCOM16
- Use Finder, Terminal, or File Explorer to copy the contents of the bin folder (you should copy 4 .bin files) to the esptool-master folder
- Use Finder, Terminal, or File Explorer to copy the
esp32_arduino_19X_19111.spiffs.bin
file from the mkspiffs folder to the esptool-master folder- Navigate to the esptool-master folder in Terminal or Command Prompt
- Run the command (don't forget to replace the --port (/dev/cu.wchusbserial1410) option for your T-Stick port):
esptool.py --chip esp32 --port /dev/cu.wchusbserial1410 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 boot_app0.bin 0x1000 bootloader_dio_80m.bin 0x10000 esp32_arduino_19X_19111.ino.bin 0x8000 esp32_arduino_19X_19111.ino.partitions.bin 2686976 esp32_arduino_19X_19111.spiffs.bin
. Wait for the process to be complete. Do not unplug or turn off your T-Stick during the process.To test if the data is being send correctly:
READ ALL DEPENDENCIES AND OBSERVATIONS BEFORE UPLOAD !
To download and install Arduino IDE, follow the instructions at https://www.arduino.cc/en/main/software.
You need to upload a file (data/config.json) into ESP32 filesystem. Follow the instructions at https://github.com/me-no-dev/arduino-esp32fs-plugin.
- ESP32 Arduino core 1.0.4 or newer. Instructons at https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/boards_manager.md. Install using boards manager
- For some systems it may be required to also install the ESP8266 Arduino core. Instructons at https://github.com/esp8266/Arduino. Install using boards manager
- Wifi32Manager. Instructons at https://github.com/edumeneses/WiFi32Manager#installing. Install using manual installation
- Adafruit_LSM9DS1. Install using library manager
- ArduinoJSON v6.12 or up. Install using library manager
- CNMAT OSC library v3.5.7 or up. Install using library manager
- DocSunset MIMU Library. Install using manual installation
- Eigen linear algebra library for Arduino. Install using manual installation
Observations:
- MINU library complains if you keep any IMU-related files other than MIMU_LSM9DS1.h and MIMU_LSM9DS1.cpp
- Microcontroller currently in use for T-Stick 2GW: Wemos LOLIN D32 PRO
Each T-Stick uses a config.json file to store all configuration paramethers.
- Make the necessary changes to the config.json file:
- device: replace color with the shrinking material color, and 19X with T-stick's serial number
- author: replace IDMIL with the builder's name (or alias)
- nickname: replace color with the shrinking material color
- id: replace 190 with your T-Stick serial number
- Save the file at the data folder (inside esp32_arduino_19X_19101). Make sure config.json is the only file at data folder
- Open the file
esp32_arduino_FW200422.ino
using Arduino IDE - Choose the proper board:
Tools -> Board: "*******" -> LOLIN D32 PRO
- Choose Upload Speed:
Tools -> Upload Speed: "******" -> 115200
- Choose port:
- Keep the T-Stick disconnected to the computer
- Go to:
Tools -> Port
and take note the available ports - connect the T-Stick to the computer using an USB cable and turn the T-Stick ON
- Go to:
Tools -> Port
and choose the new available port (T-Stick port)
- Upload the firmware:
Sketch -> Upload
. Do not disconnect or turn the T-Stick off during the upload process - Upload config.json:
Tools -> ESP32 Sketch Data Upload
. Do not disconnect or turn the T-Stick off during the upload process
To test your T-Stick after flashing firmware/config.json, you can use Arduino IDE:
- Choose T-Stick serial port
- Open the Serial Monitor (
Tools -> Serial Monitor
)
You should see T-Stick booting process.
To test if the data is being send correctly:
- Connect the T-Stick to a network (instructions here)
- Open the Pure Data (PD) or Max/MSP patch to receive T-Stick messages (they can be found here)
- Start receive OSC messages according to the chosen patch
Updating the firmware does not erase the T-Stick saved configuration and it is a relatively simple process:
Download the bin files:
- Download the .bin files located at the bin folder
Download esptool.py:
- Download the esptool.py from https://github.com/espressif/esptool. Use the
Download ZIP
option from Github- Unzip the esptool-master.zip file
- Check the T-Stick (ESP32) port in your computer:
- For MacOS/Linux:
- Open a Terminal window
- Execute the command
ls /dev/cu.*
. The command will return a list of ports in your computer.- Plug the T-Stick (USB) and run the command
ls /dev/cu.*
one more time. You can now compare the lists and anotate the T-Stick USB port. Should be something similar to/dev/cu.wchusbserial1410
, probably with a different number- Linux users should also give the currently logged user read and write access the serial port over USB. Check here for more information
- For Windows:
- Check the list of identified COM ports in the Windows Device Manager
- Plug the T-Stick (USB) and check the list of identified COM ports in the Windows Device Manager again. The T-Stick port should appear on the list. Anotate the T-Stick USB port, it should be something similar to
COM3
orCOM16
- Use Finder, Terminal, or File Explorer to copy the contents of the bin folder (you should copy 4 .bin files) to the esptool-master folder
- Use Finder, Terminal, or File Explorer to copy the
esp32_arduino_19X_19111.spiffs.bin
file from the mkspiffs folder to the esptool-master folder- Navigate to the esptool-master folder in Terminal or Command Prompt
- Run the command (don't forget to replace the --port (/dev/cu.wchusbserial1410) option for your T-Stick port, and the .bin names for the version you plan to upload):
esptool.py --chip esp32 --port /dev/cu.wchusbserial1410 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 boot_app0.bin 0x1000 bootloader_dio_80m.bin 0x10000 esp32_arduino_19X_19111.ino.bin 0x8000 esp32_arduino_19X_19111.ino.partitions.bin
. Wait for the process to be complete. Do not unplug or turn off your T-Stick during the process.
T-Stick connection guide – v1.1 for wireless T-Sticks (model 2GW-19X)
How to build a T-Stick Sopranino
Sopranino T-Stick 2GW - LOLIN D32 PRO - USB -WiFi
Input Devices and Music Interaction Laboratory (IDMIL)
Created: February 2018 by Alex Nieva
April 2020 by Edu Meneses - firmware version 200422
Notes: Based on test program for reading CY8C201xx using I2C by Joseph Malloch 2011
Adapted to work with Arduino IDE 1.8.10 and T-Stick Sopranino 2GW
WiFi32Manager - For use with ESP8266 or ESP32
Created originally for the T-Stick project:
http://www-new.idmil.org/project/the-t-stick/
This code uses code (fork) of 3 other projects:
https://github.com/kentaylor/WiFiManager
https://github.com/tzapu/WiFiManager
https://github.com/zhouhan0126/WIFIMANAGER-ESP32
Edu Meneses - IDMIL - Mar 2019
MIMU - Magnetometer + accelerometer + gyroscope orientation library
https://github.com/DocSunset/MIMU
Travis West - IDMIL - Oct 2019