Datasheet
Monitoring via netwmgr
You can monitor the led_toggles value via newtmgr with the following command (where we can see that the LED
had been toggled 11 times to far in this case):
Monitoring via shell/console
Alternatively, you can connect to the shell (for example, via: $ minicom -D /dev/tty.USBtoUART ) and run the stat
led_stats command to get the same value(s):
static void
led_task_func(void *arg)
{
/* Configure the LED GPIO as an output and HIGH (On) */
hal_gpio_init_out(LED_BLINK_PIN, 1);
while (1) {
/* Wait one second */
os_time_delay(OS_TICKS_PER_SEC * 1);
/* Toggle the LED */
hal_gpio_toggle(LED_BLINK_PIN);
/* Increment the LED stat */
STATS_INC(g_ledstats, led_toggles);
}
}
$ newtmgr -c serial1 stat led_stats
stat group: led_stats
11 led_toggles
© Adafruit Industries https://learn.adafruit.com/adafruit-nrf52-pro-feather Page 67 of 87










