enaon / eucWatch

EUC Watch. Dash for Electric Unicycles on NRF52xx based wearables. Supports Kingsong ( All models ), Inmotion ( All ), Ninebot ( All ) , Begode ( Gotway, All ) and Leaperkim (All)
https://enaon.github.io/eucWatch/
64 stars 28 forks source link

P22 Drivers #9

Open vjapolitzer opened 3 years ago

vjapolitzer commented 3 years ago

Hello,

Thanks for all our amazing work on this! I successfully got it running on a P22 (P22B?)! However, touch (and possibly accel) are not quite working right. The driver that works the best for touch is the 816 driver, but taps are not recognized, only swipes and long presses. It also wakes from a down swipe.
I think the touch controller IC may be the 716S or something like that? I took apart the watch to get a closer look at its components.
WIN_20210607_11_09_29_Pro
Raise to wake does not work for either BMA421 or SC7A20 driver. Maybe I am misunderstanding how that is supposed to work. I can take a closer look if the pinout is changed or something, let me know!
WIN_20210607_11_15_49_Pro
FCC also has some nice photos of the inside: https://fccid.io/2AGFWP22/Internal-Photos/Internal-Photos-4786333

Best,
Vincent

enaon commented 3 years ago

thank you very much for all the info, I have a p22 coming and will try to see what is different.

three p8s came this week, all ton, all working, it seems that only utelite store from ali has the non compatible ones until now, maybe I spoke too soon about end on line for the p8.

tyrone1984 commented 3 years ago

I had one too

SPIFLASH pin_sck D2 pin_mosi D3 pin_miso D4 pin_cs D5

D15 BTN1 D16 VIBRATE D19 Charging(BAT)

D22 BackLight

and no led pin

enaon commented 3 years ago

thank you very much

so it uses d15 for the button and only uses d22 for brighntess, d14 and d23 are not used?

tyrone1984 commented 3 years ago

Sorry I don't know how to detect pin, but the touch IC is cst816 when I opened it

enaon commented 3 years ago

Vincent

is the side button working on your p22b? it is on a different pin on the p22 it seems, d15 instead of D17 for the p8.

vjapolitzer commented 3 years ago

Vincent

is the side button working on your p22b? it is on a different pin on the p22 it seems, d15 instead of D17 for the p8.

No, it is not working. When I get a chance I can pop mine open again and check the pins.

enaon commented 3 years ago

Vincent

is the side button working on your p22b? it is on a different pin on the p22 it seems, d15 instead of D17 for the p8.

No, it is not working. When I get a chance I can pop mine open again and check the pins.

thanks, use this image, it makes the button work ok. Also reload the init file (p8 core), the watchdog was static to d17, it is now changed to BTN1.

https://github.com/fanoush/ds-d6/blob/master/espruino/DFU/P8/espruino_2v09.119_p22_SDK12_SD30_SPIFLASH4M.zip

It also wakes from a down swipe.

this is a feature, but only works on controllers that auto sleep. So it is nice that yours wakes up with a down gesture, only first gen p8s do that.

enaon commented 3 years ago

but taps are not recognized

if you have some time, reload the handler(select 816- restart after upload) file from https://enaon.github.io/eucWatch/p8-testing and connect to the watch using the ide: https://www.espruino.com/ide/

it will spill out the touch values on the left side, if you can please upload the output on a tap.

vjapolitzer commented 3 years ago

but taps are not recognized

if you have some time, reload the handler(select 816- restart after upload) file from https://enaon.github.io/eucWatch/p8-testing and connect to the watch using the ide: https://www.espruino.com/ide/

it will spill out the touch values on the left side, if you can please upload the output on a tap.

The new espruino image does indeed make the button work!
Here are some outputs from the IDE:

// Four Swipes, seems to be working fine
new Uint8Array([0, 4, 1, 128, 40, 0, 118])
new Uint8Array([0, 3, 1, 128, 192, 0, 133])
new Uint8Array([0, 2, 1, 128, 134, 0, 146])
new Uint8Array([0, 1, 1, 128, 128, 0, 43])

// Four long presses (registers only after releasing finger)
new Uint8Array([0, 12, 1, 128, 16, 0, 112])
new Uint8Array([0, 12, 1, 128, 165, 0, 106])
new Uint8Array([0, 12, 1, 128, 30, 0, 115])
new Uint8Array([0, 12, 1, 128, 88, 0, 16]

// Four taps
new Uint8Array([0, 0, 0, 64, 10, 0, 24])
new Uint8Array([0, 0, 0, 64, 222, 0, 14])
new Uint8Array([0, 0, 0, 64, 9, 0, 128])
new Uint8Array([0, 0, 0, 64, 207, 0, 111])
enaon commented 3 years ago

// Four taps

Thank you. Please reload the handler, taps should now work.

https://enaon.github.io/eucWatch/p8

ps. sorry about closing the issue, it was by mistake.

vjapolitzer commented 3 years ago

Excellent - taps are working great, thanks! Additionally, since now I am able to toggle the raise-to-wake function, I can confirm SC7A20 driver is working with my P22.

enaon commented 3 years ago

very nice, can you please post a link of where you got it from?

vjapolitzer commented 3 years ago

Sure, https://www.amazon.com/IDEALROYAL-Smartwatch-Fitness-Tracker-Bluetooth/dp/B08TLMGWXJ/ IDEALROYAL branded Black P22 from Amazon seller, Meixiong US. $24.99 (USD) with Prime shipping after coupon (don't know how long the coupon will last)