Tinkering with a Kospet ROCK #3272
Replies: 16 comments
-
Posted at 2023-08-26 by Kaoron A few thoughts about the development on this watch:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-08-28 by @fanoush
Not sure about the fitness part, not even sure @jeffmer got the heartrate sensor working.
There is also eucWatch made by @enaon
closures are not an issue but low memory in general is |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-08-28 by Kaoron
Thanks for the pointer !
I'm currently looking into the existing HRS code, any particular reason it would be difficult to implement ?
What are the available strategies to profile memory usage on Espruino ? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-08-30 by Kaoron
Okay, got it... the datasheet for the HRS3603 isn't exactly dev friendly... and then he disappeared into the rabbit hole |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-08-30 by Kaoron I managed to translate part of the driver mentioned above to js and get some readings. BPM values are all over the place, but that's a start... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-08-30 by @fanoush Good find, I think we did not have any source and the datasheet did not say much. Often the glue source comes with some linkable library with the HR/BP/SPO2 algorithm, without that you only get raw PPG data. Also the trick can be with tuning it on the fly so that the PPG data is good quality see this example for VC31 in bangle https://github.com/espruino/Espruino/blob/master/libs/misc/hrm_vc31.c#L268 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-08-30 by Kaoron Thanks! Edit: deleted wild guesswork, misread the datasheet. I don't know what I'm doing. On the algorithm part, I didn't find the code using that driver (it seems to be dead code, replaced by a driver for the HX3605), but I expect to be able to use what jeffmer has for processing the signal. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-08-31 by Kaoron I guess I'm an idiot. Readings were all over the place because I was reading noise. Led doesn't seem to turn on. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-08-31 by Kaoron Here's my "driver" at this point, if anyone wants to give a shot at understanding what's missing.
And here's the module I use it with
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-08-31 by Kaoron This is the datasheet for what seems to be an earlier iteration of the same chip architecture. Register addresses are not accurate and some are missing, but it looks overall closer to the 3603 than the 3605, 3300 or 3313 and provides a bit more info. Edit : scratch that, it's basically the same as the 3313. http://www.synercontech.com/Public/uploads/file/2019_10/20191020152311_81180.pdf |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-08-31 by Kaoron Le led driver current control implementation is described like this in the 3603 datasheet :
And in the driver :
Look vaguely consistent. Shame that the 0xC4 register isn't documented (among others). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-08-31 by Kaoron One weird thing (to me, maybe it's normal) is that the I2C device needs to be 'primed' by a first read (write?) to its registers to have them initialized. The first read seems to be garbage. Here's attached a dump of the registers after priming, with annotations.Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-09-06 by Kaoron A few updates :
I'm not trying to be compatible with Bangle.js, maybe I'll end up implementing something very similar, maybe not. I'd like to tinker a bit with low-level graphics eventually in order to implement some efficient masking, but I'm kind of afraid to brick my device in the process.Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-09-06 by @fanoush Nice :-)
Use watchdog, ping it only when button is not held. Something like this https://github.com/fanoush/ds-d6/blob/master/espruino/DFU/Magic3/code.js#L1C1-L6C1 If you flashed my bootloader then it is standard Espruino bootloader so it should enter DFU mode when you hold button at reboot time for less than 3 seconds or it enters Espruino but avoids running any js code at startup if you hold it longer (test it now :-), if you put watchdog pinging on BTN2 then you could decide to just reboot (by holding BTN2) or also enter DFU or skip code at startup by holding both. You could also enable watchdog directly inside C startup code if you modify Espruino FW and are afraid of freezing at FW initialization before js code is executed. Also if you don't use or trust watchdog then keep battery level low and/or enable something that drains battery fast to let it die sooner (backlight, or maybe Serial port is more harmless - it should die in a day or two from full battery) and you can then hold BTN1 before you attach charger. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-09-06 by Kaoron I do use the watchdog already, a lot of my early code comes from your demo and jeffmer's repo. However what I'd like to do is to create a few graphics routines in C to avoid the overhead from the interpreter. At the moment I'm drawing overlays upon overlays to achieve masking, which is pretty suboptimal. Gotta put my head into custom builds but that's a lot of foreign stuff to take in :). Edit : That |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-09-07 by @thyttan If we could have Kospet Rock with transflective display 🤤 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2023-08-25 by Kaoron
Hi there !
I recently got a Kospet ROCK (C16) smartwatch, that I almost instantly turned into a near-useless Espruino-powered tinkering playground thanks to the instructions shared by @fanoush and @jeffmer.
I don't have a lot of experience in embedded stuff apart from playing a bit with adafruit's circuitpython, but I'm looking forward to make my watch vaguely useful again with some code of my own.
I don't have a precise idea yet of what I want to do with it, apart from restoring its time and fitness abilities.
Code will be here :
https://gitlab.com/ddelemeny/watchapps
Any other projects on this watch I should know about ?
Beta Was this translation helpful? Give feedback.
All reactions