Smartwatch Journey – Part #7

It’s finished! Somehow…

You can check some photos on my Instagram @kovacdottop.

First of all, I was using millis() function to get the current time but the millis() resets after 68 minutes. So I was looking for another option. I am using Ticker object now. I execute void every seconds which increments seconds variable storing unix time in seconds. I use another variable to count up to 60 and then I refresh time, date day name, battery voltage if changed. This is better solution than looking for overflowing millis because if you want to run BLE you have to waitForEvent in the loop void, so you can’t refresh time.

Next, I added onReceive(String msg) void for BLE. I wait for any ble event and if I receive any data I show example logo.

But there is a problem, it gets stucked sometimes when there is some ble event. The time isn’t refreshed anymore. So this is on my current queue.

Pridaj komentár

Vaša e-mailová adresa nebude zverejnená. Vyžadované polia sú označené *