Skip to content

Getting started with the Grove Mesh Kit

This guide describes how to start working with the Grove Mesh Kit in just a few minutes.

Included in the Box

Your Grove Mesh Kit box includes the following parts:

  • nRF52840 Micro Development Kit
  • Base Dock (Grove Compatible)
  • Grove - Button
  • Grove - Light Sensor
  • Grove Rotary Angle Sensor
  • Grove - Sound Sensor
  • Grove - Temperature Sensor
  • Grove - Touch Sensor
  • USB 3.1 Type-C Cable
  • M3 Screws & Plastic Spacers

Assemble the hardware

  1. Place the nRF52840-MDK board onto the Base Dock

  2. Connect the Grove modules to the Base Dock

  3. Attach the four plastic spacers supplied in your box to act as legs for the Base Dock

  4. Insert an AA battery into the holder the right way around as marked on the board

Tip

AA battery is NOT included in the kit. The Energizer® Ultimate Lithium™ AA battery is recommended to stay powered longer.

Clone the repository

Clone the grove-mesh-kit repository from GitHub:

git clone --recursive https://github.com/makerdiary/grove-mesh-kit

This repository provides documents and examples that you can run on your kit to ensure that everything is set up correctly.

Run the Grove CLI example

To quickly explore the modules, run the Grove CLI example provided with the Grove Mesh Kit.

Grove CLI is a minimal application that exposes the Grove configuration and management interfaces via a basic command-line interface. This example source code is located in examples/grove_cli.

Flash the nRF52840-MDK

Follow these steps to flash the Grove CLI pre-built firmware.

  1. Connect the nRF52840-MDK board to your PC using the USB-C cable.
  2. Open a file explorer. Confirm that the board has appeared as a removable drive named DAPLINK. This allows you to program the nRF52840 chip.
  3. Drag and drop the pre-built firmware into DAPLINK. The Grove CLI pre-built firmware is located in grove-mesh-kit/examples/grove_cli/hex.

Tip

You can also program the board using pyOCD. Just follow this tutorial to set up the pyOCD tool.

Explore the Grove modules

You can explore the Grove modules using a serial terminal like screen or PuTTY.

In Terminal, run:

screen /dev/cu.usbmodem846fa1a9d0de1 115200

If you are using Windows OS, run the PuTTY application instead:

Tip

Replace the serial port name /dev/cu.usbmodem846fa1a9d0de1 or COM16 with yours.

For your convenience, our Web Device CLI provides a Web Command Line Interface using Web Bluetooth. Here, we use the Web Device CLI to demonstrate the Grove CLI example. The commands should work similarly in your serial terminal.

  1. Upon powering up the board with the USB or AA battery, the GREEN LED starts blinking. The device is advertising as Grove CLI.

  2. Start the Web Device CLI by clicking the following link:

  3. Click the Connect button and pair the Grove CLI device.

  4. Type grove and press the Enter button to see the hints.

  5. Read the Grove - Rotary Angle Sensor connected to PORT#2 by running:

    grove angle -p 2
    

    You will see the result like this:

    grove_cli:~$ grove angle -p 2
    ADC RAW: 629
    Angle: 201[degree]
    grove_cli:~$
    
  6. Read the Grove - Light Sensor connected to PORT#3 by running:

    grove light -p 3
    

    The CLI outputs like this:

    grove_cli:~$ grove light -p 3
    ADC RAW: 27
    Voltage: 94[mV]
    grove_cli:~$
    
  7. Read the Grove - Sound Sensor connected to PORT#4 by running:

    grove sound -p 4
    

    You will get the sound level:

    grove_cli:~$ grove sound -p 4
    Sound Level: 47[dB]
    grove_cli:~$ 
    
  8. Read the Grove - Temperature Sensor connected to PORT#2 by running:

    grove temp -p 2
    

    You can get the ambient temperature:

    grove_cli:~$ grove temp -p 2
    ADC RAW: 493
    Temperature: 23.50[degreeC]
    grove_cli:~$ 
    
  9. Connnect the Grove - Button to PORT#1, then run:

    grove button enable -p 1
    

    Press and release the button. The CLI outputs like this:

    grove_cli:~$ grove button enable -p 1
    Grove Button on Port1 Enabled
    grove_cli:~$ 
    Button on Port1: Pressed
    Button on Port1: Released
    
  10. Connect the Grove - Touch Sensor to PORT#2, and run:

    grove touch enable -p 2
    

    Touch and release the touch pad. The CLI outputs like this:

    grove_cli:~$ grove touch enable -p 2
    Grove Touch on Port2 Enabled
    grove_cli:~$ 
    Touch on Port2: Touched
    Touch on Port2: Released
    

Next Steps

Congratulations! You may find your way around:

Create an Issue

Interested in contributing to this project? Want to report a bug? Feel free to click here: