Umidigi Uwatch 2 Espruino port #6859
Replies: 1 comment
-
Posted at 2022-01-10 by @fanoush well, this is fork and quite old version, can you try to log jshIsPinValid(pin) and also output of nrf_gpio_pin_read(pin). Also can you put the jshPinGetValue is here https://github.com/kabbi/espruino-uwatch/blob/master/targets/nrf5x/jshardware.c#L824 so check what it does line by line, something must be seriously broken if such basic method does not work. Posted at 2022-01-10 by @gfwilliams Just to add it's really worth trying to update the firmware. I seem to recall there were some instabilities in the handling of pin state changes in early firmwares. Also, with later firmwares there's been a lot of work put into trying to make the standard Bangle.js code work on different watches, so when you update you could probably use the standard Posted at 2022-01-10 by thejoker187 Hello @gfwilliams, nice to read you again, yes my first idea was to use the latest version of espruino because it is the most logical thing to do, but I'm new to espruino and I though that this was too difficult for me, thanks to the precious help provided by @fanoush I feel a bit more confident now so I will give a try with the latest version of espruino Posted at 2022-01-10 by thejoker187 A quick update, as suggested by @fanoush I logged a bit more code and here is the result:
and here is the output:
so from waht I can see the nrf_gpio_pin_read() is not working basically all the analog pins were added back to the board file by the way. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2022-01-09 by thejoker187
Hi all,
I'm working on the Uwatch 2 from umidigi and thanks to @fanoush and @gfwilliams I was able to have espruino running on it, version is 2v05.29 and I started from this github repo https://github.com/kabbi/espruino-uwatch . I'm facing some issues regarding the battery operations. The first one is the about the isCharging() basically it does not detect the pin change from low to high when I plug the charging plug, thanks to @fanoush suggestion I added some printf to understand what happen when isCharging() is called from javascript as you can see below:
and this is the output in the espruino ide when I now call Uwatch.isCharging()
The pin is defined correctly as BAT_PIN_CHARGING but it is not reading the change. Strange thing is that if I use instead digitalRead(19) I can see the pin change when I plug / unplug the charger cable. I would like to fix this if is possible in some way.
The second issue is about the getBattery() function, it included in the UWATCH.py and is present in the jswrap_uwatch.c but is not available in the interpreter itself if I try to call it in the IDE by doing E.
I hope the informations are detailed enought
Any help will be very appreciated
Beta Was this translation helpful? Give feedback.
All reactions