Skip to content

Latest commit

 

History

History
63 lines (51 loc) · 5.44 KB

readme.md

File metadata and controls

63 lines (51 loc) · 5.44 KB

watch2

a picture of the watch

This repository contains the software and design files for my custom smartwatch thing. The system is built on an ESP32, and the software is written in C++, using ESP-IDF and Arduino. The software includes a few "apps", which are shown below.

The device uses a custom PCB that holds the ESP32, and all the other electronics that make the system work. The PCB was designed in KiCad, and the enclosure for the device was made in OpenSCAD.

The system isn't as powerful as existing smartwatches, but it was a really great way for me to learn a lot of electronics and programming concepts and tools. This isn't supposed to be a marketable product, but a proof of concept thing, and a way for me to develop my skills. This repository is here as a kind of archive to show the level my skills are at at time of writing, and hopefully as a thing to look back on and learn from.

Watch Face Settings Calculator Stopwatch
Timer Alarms File Browser Notepad (read only)
IR Remote Image Viewer Weather Wikipedia
Quiz Music Player Internet Radio BLE Remote
Sensor Thing Tetris Snek 2 NES

Project Structure

  • components ESP-IDF components
  • design_files KiCad files for the schematic and PCB
  • docs documentation for the system (see docs/readme.md for more detail)
  • extras other stuff like icons, data files, and pinout for the original breadboard prototype
  • main where all the code lives
  • spiffs data and images for the SPIFFS partition

Build Instructions

These are some rough instructions for installing and flashing the software on to an ESP32 board. These steps are mainly aimed for Linux systems.

  1. make sure the latest commit of ESP-IDF is installed and setup (this software is currently using commit 1d7068e)
  2. git clone this repository somewhere - git clone https://github.com/atctwo/watch-II.git
  3. cd into the project directory
    • then run these commands:
    chmod +x install_libraries.sh
    ./install_libraries.sh
    
    • this script automatically clones all of the submodules that the system depends on, then makes any neccessary modifications
  4. use idf.py menuconfig to tell ESP IDF the flash size of the ESP32 you are using
    • go to Serial flasher config → Flash size and select the right flash size (i've only created partition files for 8MB and 16MB at the minute)
    • go to Partition table → Custom partition CSV file and enter either partitions_8mb.csv or partitions_16mb.csv
  5. to build the software, run idf.py build, and to write the built firmware to an ESP32 board, run idf.py flash (see the ESP-IDF documentation for more detail on these commands)
  6. next, flash an SPIFFS image to the device
    • to do that from the root of the repository, call one of these commands depending on what flash size your ESP32 has:
    # if you're using an 8 MB flash
    esptool.py --port /dev/ttyUSB0 write_flash 0x340000 spiffs/spiffs_8mb.bin  
    
    # if you're using a 16 MB flash
    esptool.py --port /dev/ttyUSB0 write_flash 0xE20000 spiffs/spiffs_16mb.bin  

Credits