Hi all,
I'm working on the Uwatch 2 from umidigi and thanks to @fanoush and @Gordon 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:
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.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi all,
I'm working on the Uwatch 2 from umidigi and thanks to @fanoush and @Gordon 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