Grove - Button Tutorial¶
This tutorial shows how to use Grove-Button module with Base Dock.
- Base Dock Board
- nRF52832-MDK or nRF52840-MDK
- A Grove - Button module
- AA Battery
- Micro USB cable(for nRF52832-MDK), or Tpyc-C USB cable(for nRF52840-MDK)
Connect the hardware¶
Connect Grove-Button to Port#1 on the Base Dock, and then insert the battery.
Build and Run the Example¶
The following steps show how to build and run the
Navigate to the example directory:
# For nRF52832-MDK board $ cd ./base-dock/examples/grove-button/nrf52832_mdk/armgcc # For nRF52840-MDK board $ cd ./base-dock/examples/grove-button/nrf52840_mdk/armgcc
Connect nRF52832-MDK or nRF52840-MDK to your PC.
Build the example and flash to the board.
$ make flash_all
$ screen /dev/cu.usbmodem142310 115200
The button state will be printed on the console while pushing or releasing the button.
The board can be powered by the AA battery after removing the USB cable!
Create an Issue¶
Interested in contributing to this project? Want to report a bug? Feel free to click here: