You are reading a single comment by @thejoker187 and its replies. Click here to read the full conversation.
  • 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/sear­ch/?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/searc­h/?q=%23else)
    	
      return 0;
    [#endif](https://forum.espruino.com/sear­ch/?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.

About

Avatar for thejoker187 @thejoker187 started