A quick update, as suggested by @fanoush I logged a bit more code and here is the result: this is the isCharging() function:
bool jswrap_uwatch_isCharging() { [#ifdef](https://forum.espruino.com/search/?q=%23ifdef) BAT_PIN_CHARGING jsiConsolePrintf("*-> isCharging Debug: \n"); jsiConsolePrintf("*-> PIN: %d\n",BAT_PIN_CHARGING); jsiConsolePrintf("*-> ReadPin %d\n",jshPinGetValue(BAT_PIN_CHARGING)); jsiConsolePrintf("*-> DBG PIN Valid %d\n",jshIsPinValid(BAT_PIN_CHARGING)); jsiConsolePrintf("*-> DBG PIN Nrf %d\n",nrf_gpio_pin_read(BAT_PIN_CHARGING)); return jshPinGetValue(BAT_PIN_CHARGING); [#else](https://forum.espruino.com/search/?q=%23else) return 0; [#endif](https://forum.espruino.com/search/?q=%23endif) }
and here is the output:
>Uwatch.isCharging() *-> isCharging Debug: *-> PIN: 19 *-> ReadPin 1 *-> DBG PIN Valid 1 *-> DBG PIN Nrf 0 =true >Uwatch.isCharging() *-> isCharging Debug: *-> PIN: 19 *-> ReadPin 1 *-> DBG PIN Valid 1 *-> DBG PIN Nrf 0 =true
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.
@thejoker187 started
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.
A quick update, as suggested by @fanoush I logged a bit more code and here is the result:
this is the isCharging() function:
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.