Software apps and online services
I want to introduce to you the watch which I made with M5StickC. I had an idea to make the “super-cool-amazing” watch….
....and now I have a watch with more than 8 hours of stamina, three alarms and settings over BLE. So, I am satisfied. :)
After turning on (or loading program to the watch) the time from RTC is checked. Also, alarms from EEPROM are loaded and checked if it’s their time. If it is detected the reason for waking up as a menu button press, is the settings menu showed, on the other side the watch again felt to the sleep mode.
When it is time to fire alarm, the application will turn on the LED, and again felt into the sleep mode.
If it’s the menu showed, the watch turning on the Bluetooth. In this time is possible to set time or alarms over the mobile app.
There is a very small battery (80 mAh) in M5StickC, but on the other side, the whole device is perfectly small. With a feature “Display Always On”, which is important in this project, the watch shows actual time over 8 hours.
For settings this watch I decided to use BLE. Exactly BLE serial profile. In this profile you can use only 20 bytes for transmitting data. Bluetooth is turned on only in settings mode.
It works great with Bluetooth Serial Terminal.
Mobile app (including source code for Thunkable.com) you can find on my Github.
M5StickC has two programmable buttons. It is possible to use each of them in different modes (click, double click, long click,...) ( https://github.com/poelstra/arduino-multi-button ). I think the long click or double click is not ergonomic, so I used an accelerometer to simulate the third button. For back action in the menu is possible to tap on the M5StickC.
This watch supports three alarms. Every alarm can be enabled or disabled over a menu in the watch, changing time is possible only over BLE. If the alarm is fired, the LED is turned on. In the future version will be possible to send some code over infrared LED for turning on a TV or something, send HTTP request over WiFi, etc.
I used this cool tool ( https://www.riuson.com/lcd-image-converter ) for conversion image to the right format (RGB565).
In my M5StickC watch, I use 10 bytes for settings.
1B for display brightness
3B for every alarm (it is possible to set 3 alarms)
On the first bit of the first byte of each alarm is stored mark for using this alarm.
On the second byte is stored minute of each alarm. The last byte is used for parity of each record. The parity is counted as one hundred minus the sum of the hour and minute. For example, for the alarm 14:45 is parity 41, because 100 - (14 + 45) = 41
Super cool menu - I used specially edited beta version :)
lang-ship.com - A perfect source of M5StickC features
And of course the official M5Stack documentation.
M5Watch.aia - source file for a classic version of Thunkable
M5Watch.apk - binary file for Android generated from Thunkable
Both of these files you can find in my Github.
Thanks to my beloved family...