Getting Started with Base Dock¶
This tutorial shows how to set up the Base Dock with an nRF52832-MDK or nRF52840-MDK development board in just a few minutes.
Hardware Requirements¶
- 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)
- A smart phone with nRF Connect App installed
Assemble the hardware¶
-
Place the nRF52832-MDK or nRF52840-MDK board onto the Base Dock
-
Connect Grove-Button to Port#1 on Base Dock
-
Attach the four plastic spacers supplied in your box to act as legs for the Base Dock
-
Insert the AA battery into the holder the right way around as marked on the board
Clone the repository¶
To clone the base-dock
source code repository from GitHub:
git clone --recursive https://github.com/makerdiary/base-dock
Download the nRF5 SDK¶
Download the SDK package from developer.nordicsemi.com.
The current version we are using is 15.2.0
, it can be downloaded directly here: nRF5_SDK_v15.2.0_9412b96.zip
Extract the zip file into the base-dock/nrf_sdks/
directory. This should give you the following folder structure:
./base-dock ├── LICENSE.md ├── README.md ├── config ├── docs ├── examples ├── external ├── material ├── mkdocs.yml └── nrf_sdks ├── README.md └── nRF5_SDK_15.2.0_9412b96
Install GNU Arm Embedded Toolchain¶
Download and install a GNU ARM Embedded build for your operating system and extract it on your file system.
Note
The current version we are using is 6-2017-q2-update
.
Config the toolchain path in makefile.windows
or makefile.posix
depending on platform you are using. That is, the .posix
should be edited if your are working on either Linux or macOS. These files are located in:
<nRF5 SDK>/components/toolchain/gcc
Open the file in a text editor and make sure that the GNU_INSTALL_ROOT
variable is pointing to your GNU Arm Embedded Toolchain install directory. For example:
GNU_INSTALL_ROOT := $(HOME)/gcc-arm-none-eabi/gcc-arm-none-eabi-6-2017-q2-update/bin/ GNU_VERSION := 6.3.1 GNU_PREFIX := arm-none-eabi
Build and Run an Example¶
Next, you can build the examples provided with the base-dock
repo. The following steps show how to build and run the ble_app_blinky
example:
-
Navigate to the example directory:
# For nRF52832-MDK board $ cd ./base-dock/examples/ble_app_blinky/nrf52832_mdk/armgcc # For nRF52840-MDK board $ cd ./base-dock/examples/ble_app_blinky/nrf52840_mdk/armgcc
-
Connect nRF52832-MDK or nRF52840-MDK to your PC
-
Build the example and flash to the board
$ make flash_all
-
Open nRF Connect App and start scanning, a device called Nordic_Blinky will be found!
-
Connect
Nordic_Blinky
device, and start to test the LED and Button service. -
The device can be powered by the AA battery after removing the USB cable!
More Tutorials¶
Please visit Tutorials page for more examples. If you don't see what you're looking for, you can Request a tutorial. We'd love to see your feedback!
Create an Issue¶
Interested in contributing to this project? Want to report a bug? Feel free to click here: