An alternative software distribution for the TTGO smartwatch based on ESP32 from LilyGo. Currently under active development (check back often for new functionality)
Forked from the excellent software by sharandac https://github.com/sharandac/My-TTGO-Watch with some small fixes and different apps.
- Changed main font (e.g for the timeface) to FreeMono (TODO: Fix naming. Still appears as 'ubuntu')
- Removed crypto ticker
- Removed weather app
- Removed FTP server (TODO: will try to add SSH server for SCP)
- Removed osmand mapping app
- Removed some of the haptic motor stuff
- Removed update feature for now (TODO: probably to update over SSH)
- Fixed a sound issue with wav/mp3 playback
Clone this repository and open it with platformIO. Build and upload. On a terminal in vscode you can do it with
pio run -t upload
or simple press "build and upload" in platformIO.
The first time you may wish to add bluebox mp3 files with:
pio run -t uploadfs
- the battery indicator is not accurate, rather a problem with the power management unit ( axp202 )
SSH client sometimes (after a while) produces false 'connection error' and watch needs to be rebooted to restore app to working(hopefully resolved) - after using the wifi monitor may need to turn wifi back on afterwards to use normal functions
- from time to time the esp32 crashes accidentally
- and some other small things
- I have found it best for battery and stability to use just the wifi and keep the bluetooth disabled for now
- I set a plain black background via the settings which seems to make the screenshot process more stable (still some reboots)
- Seems best to disable webserver when not in use
Bluebox - bluebox for the phreaks (add the included mp3 files to SPIFFS using pio run -t uploadfs
the first time)
Netscan - Simple connect() based port scanner (slow with unreachable/blocked hosts - is there a better way working for ESP32?)
Subnet - Simple subnet calculator to see how many hosts / valid hosts
Ping - Ping some IP address
IP Lookup - Lookup who owns an IP via the ip-info API
SSH client - Password only for now (no keys - TODO) / (known hosts handling via SPIFFS - TODO)
SSID Spam - Advertise some wireless networks named like Rick Astley lyrics
WiFi mon - See how busy a wireless channel is
IR Remote - IR remote
Stopwatch - Stopwatch
Alarm - Alarm clock
If you have something you would like to see built for the watch (especially network/security tools) then please let me know using github issues. I will also make a tutorial about how to program your own apps shortly. (Now started here: https://github.com/linuxthor/My-TTGO-Watch-Dev)
Internal RAM is very limited, use PSRAM as much as possible. When you work with ArduinoJson, include this
#include "hardware/json_psram_allocator.h"
and create your json with
SpiRamJsonDocument doc( 1000 );
to move your json into PSRAM, here is enough RAM for all the crazy stuff you will do. And use
ps_malloc(), ps_calloc() and ps_realloc()
as often as possible. And one very important thing: Do not talk directly to the hardware!
To play sounds from the inbuild speakers use hardware/sound.h
:
#include "hardware/sound.h"
[...]
// MP3 from SPIFFS:
// void sound_play_spiffs_mp3( const char *filename );
// example:
sound_play_spiffs_mp3( "/sound.mp3" )
// or WAV from PROGMEM via
//void sound_play_progmem_wav( const void *data, uint32_t len );
There is a configuration tile to enable/disable all sound output and set the global volume.
The firmware has an integrated webserver. Over this a screenshot can be triggered. The image has the format RGB565 and can be read with gimp. From bash it looks like this
wget x.x.x.x/shot && wget x.x.x.x/screen.data
I use the following import settings for GIMP:
- rgb565
- offset 1
- width 240
- height 240
Massive thanks to sharadac for the TTGO Watch project.
Where they give special thanks to the following people for their help:
5tormChild
bwagstaff
chrismcna
datacute
jakub-vesely
joshvito
JoanMCD
NorthernDIY
rnisthal
paulstueber
ssspeq
Thanks also to the following projects:
ArduinoJson
AsyncTCP
ESPAsyncWebServer
LVGL
TFT_eSPI
TTGO_TWatch_Library
ESP8266Audio
pubsubclient
ESP32Ping
LibSSH-ESP32
Every Contribution to this repository is highly welcome! Don't fear to create pull requests which enhance or fix the project, you are going to help everybody.