Skip to content

Upload Firmware using Arduino

Taraqur Rahman edited this page Apr 1, 2024 · 12 revisions

1. Install ClusterDuck Protocol and Dependencies

Search the library manager for "ClusterDuck Protocol" and install the latest release. You will be prompted in the bottom right corner of the IDE to install the library dependencies, click "install all".

Install ClusterDuck Dependencies

2. Open sketch

The ClusterDuck Protocol includes base examples for building different types of ducks. To set up a network, you will need 2 or more ducks. We recommend starting with a MamaDuck. Open the MamaDuck.ino sketch in File -> Examples -> ClusterDuck Protocol -> 1. Ducks -> MamaDuck

Opening CDP Examples

3. Setting Up a MamaDuck

Each device is required to have a unique identifier to operate properly in the network. In the MamaDuck.ino sketch, you can set the device ID on line 33:

std::string deviceId("MAMA0001");

The deviceId must be exactly 8 characters long. For our tutorial, we will use the default deviceID "MAMA0001".

Make sure that you have the correct board and port selected. Compile and upload the sketch to your device, then check the serial monitor to make sure it's working. The monitor baud rate must be set to 115200.

Serial Baud Rate

4. Setting Up a PapaDuck

Our example network will have two types of ducks. Disconnect your MamaDuck from the computer and plug in a another development board. Open the PapaDuck-Basic.ino sketch in File -> Examples -> ClusterDuck-Protocol/examples/1.Ducks/PapaDuck-Basic.

With your PapaDuck-Basic still connected to your computer and its serial monitor open, plug your MamaDuck into any power source. Make sure both boards have their antennas attached.

Look in the serial monitor of the PapaDuck for any incoming messages from the MamaDuck. If messages start showing up, your network is working!

PapaDuck Receiving Messages