I've been working on a way to set the time on an ESP32 over BLE, eventually I found a way. I used the included Arduino code on the ESP32, adapted with the use of the ESP32Time library, as this allows you to set the RTC directly, most solutions involve connecting to the internet to get the time from an NTP server, my product will be carried around across the world to getting the time from a phone makes much more sense.
Challenges:
BLE works with short strings, this meant converting the millis clock to a string, I added "" to it to get that to happen. Other ways are suggested but they didn't work for me.
Although the system time took into account the UTC offset, the millis time didn't, adding the result of the 'Z' format didn't work either, the less well-known 'X' format for time zone offset did.
Perhaps it's easier to see by looking at my blocks, there's a bit added for debugging. I'm using a variable tzone1 to pass the UTC offset around.
I wonder if writing these pause procedures correlates with having a sleep disorder, where the coder retires to their bed at night but just lies there all night staring at their clock?
I knew some one with an autistic child. The child never slept at night. It wrecked the parent's health.
The Clock Timer requires a leap of faith.
It requires you to fall off the end of your current Event block, and accept that control will resume in a Clock Timer or another Event block.
This may come as a surprise to people who started out coding in non-event oriented environments.
Clearly the Blocks are identical in function if not in colour (which is why I doubted they were Kodular blocks as they didn't burn holes in my eyes) Of course, they could indeed be Kodular blocks but as Tim points out, it doesn't matter in this specific case.
Yes you are right. But as there were a lot of "Do It's" I performed to get the desired outputs to make the guide, it would have been quite tedious for me to do the same in the App Inventor builder once again. Hence I just took snaps of the Kodular blocks, where I was working initially.