Skip to content

Instantly share code, notes, and snippets.

@nazgul26
Last active March 12, 2024 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nazgul26/6752e42da57d885788862941e5c8b18d to your computer and use it in GitHub Desktop.
Save nazgul26/6752e42da57d885788862941e5c8b18d to your computer and use it in GitHub Desktop.
Instructions on how to Upgrade Chatter to Chatter 2.0
  1. Install WSL2 - https://learn.microsoft.com/en-us/windows/wsl/install

  2. Install VS Code - https://code.visualstudio.com/download

  3. Setup VS Code for WSL - https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-vscode

  4. Install Arduino IDE in WSL - In WSL shell, run the following:

    • sudo apt-get install nautilus
    • sudo apt-get install libfuse2
    • sudo apt-get install zenity
    • sudo apt-get install libasound-dev
    • sudo apt-get install libgbm-dev
    • sudo apt install python3-serial

      Download Arduino IDE AppImage - https://downloads.arduino.cc/arduino-ide/arduino-ide_latest_Linux_64bit.AppImage       Download AppImage to ~/ in WSL (can using the Windows File Explorer to Copy)

      Run 'sudo chmod +x [image file name]' in WSL on the downloaded App Image.

      run the appImage executable to test - ./arduino-ide_latest_Linux_64bit.AppImage

  1. Get the Chatter 2.0 source and update Python - WSL>cd ~ WSL>git clone https://github.com/CircuitMess/Chatter2-Firmware.git

  2. Open the Chatter2-Firmware.ino file in Arduino IDE

  3. Add the board definitions and Compile following instructions at https://github.com/CircuitMess/Arduino-Packages/ Note: run this command if Python errors:

    • WSL>sed -i -e 's/=python /=python3 /g' ~/.arduino15/packages/cm/hardware/esp32/*/platform.txt

    At this point the Firmware should be compiled!

  4. Get the Chatter2-Library

  5. *** If you have a Chatter (green board) and NOT a Chatter 2.0 (red board) perform the following 2 steps ***

    a) Reset the Firmware using https://code.circuitmess.com/ -> 'Restore Firmware' link on top nav. Pick Chatter 2.0.
    This step will put some of the artifacts like images on the device.

    b) In VSCode open the src/PINS.hpp file - change:

     #define BATTERY_PIN 34
    
     #define PIN_WAKE 36
    
     to 
    
     #define BATTERY_PIN 36
    
     #define PIN_WAKE 34
    

    NOTE: This is my best guess on what the battery PIN mapping should be.

    THEN run:

    WSL>cp -R ~/Chatter2-Library ~/.arduino15/packages/cm/hardware/esp32/1.7.3/libraries

  6. Install / Setup USB over IP for WSL - https://learn.microsoft.com/en-us/windows/wsl/connect-usb

  7. Compile and Upload the Firmware. In the Arduino IDE:

    • Tools -> Serial Monitor and then change to 115200 baud (it is defaulted to 9600 and you will not be able to read)
    • Sketch -> Upload

    If all goes well the board will update and restart. Error messages will show in serial monitor.

  8. You can now make changes to the Firmware code (i.e. change Frequency). Adding Serial.println(..) is great way to start as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment