Install - r41d/ClusterDuck-Protocol GitHub Wiki

After the Arduino IDE is set up on your operating system we can start flashing our ducks. To create a basic ClusterDuck Network (CDN) we recommend at least two devices, a MamaDuck and a PapaDuck. If you want a larger network, you can make as many Ducks as you want.

In this section we will step-by-step set up your basic ClusterDuck Network. This will happen in at least 4 steps:

  1. Connect and select the electronic board
  2. Select the Duck We Will Make
  3. Setting Up a MamaDuck
  4. Setting Up a PapaDuck

1. Connect and select the electronic board

Take one of your devices and plug it into your computer.

Connected ESP32 board

Then, open the Arduino IDE and go to Tools -> Board -> ESP32 Arduino and select your board.

Boards

After you selected the correct port go to Tools -> Port and select the correct port. For MacOs select USB_UART port For Windows try the different COM ports

ports

2. Select the Duck We Will Make

At this point you will need to choose what kind of Duck you want to make. There are Examples for different Ducks included in the ClusterDuck Protocol. We recommend starting with a MamaDuck, Go to File -> Examples -> ClusterDuck -> Ducks -> MamaDuck

Using Cluster Duck examples

Note: every ClusterDuck network needs at least 1 MamaDuck and 1 PapaDuck

3. Setting Up a MamaDuck

To setup a MamaDuck you need to set the DuckID on line number 32 std::vector<byte> devId = {'M', 'A', 'M', 'A', '0', '0', '0', '1'};, Make sure the final DuckID is 8 characters long. Each device is required to have a unique identifier to operate properly in the network. You can modify the code for your needs or use any of the sensor example files in the SensoreExample Folder. For any api references and more explanation see API reference or go to the Source code

// Set device ID by adding 8 caracthers

std::strng deviceId = {"MAMADUCK"};

After you set the DuckID you can upload the Firmware to your development board. Click on the arrow shown below. uplaod

If the upload is successful is will say upload done and you can open the serial Monitor to see the activity of your duck. Click on the magnifying glass on the top right corner and set the baud rate at the bottom to 115200

Install

4. Setting Up a PapaDuck

The second Duck you need to set up is the PapaDuck, Disconnect your Mama from the computer and get another development board. You need to connect the Papa to your local WiFi network. Go to File -> Examples -> ClusterDuck -> Ducks -> PapaDuck and open the PapaDuck example.

For this duck you need to provide your local WiFi credentials for the WiFi network you want to connect to. Setup your SSID and Password between the “” in the code.

If you want to set up your own IoT cloud solution follow these steps. If you want to use Project OWL's DMS (Data Management System) reach out to us here. For both you will need to provide your Credentials in the PapaDuck Example as shown below.

    #define SSID        ""
    #define PASSWORD    ""

    #define ORG         ""          
    #define DEVICE_ID   ""
    #define DEVICE_TYPE "PAPA"
    #define TOKEN       ""

After you put in your credentials press upload, follow the same steps as the MamaDuck. After the upload is complete open the serial monitor and look for PapaDuck setup complete (You might need to restart the board to see the boot information in the serial monitor).

If you see a lot of .......... in the Serial monitor make sure your Wifi and IoT credentials are correct.

Note: You will need to be connected to both WiFi and MQTT before receiving any messages.

5. Test the Ducks

Now you have setup two Ducks you can test the network. Follow these steps to make sure they both work.

  1. Connect The antennas to the development boards
  2. Plug the MamaDuck into any power source and the PapaDuck into your computer
  3. Open the Serial Monitor for the PapaDuck and wait for Setup Complete
  4. Take out your phone or laptop and got to your wifi settings, Connect to DUCK EMERGENCY PORTAL
  5. After you connected wait for the Captive Portal to show up (If it doesn't show up go to 192.168.1.1)
  6. Fill in the captive portal and press submit
  7. Look in the Serial Monitor from the PapaDuck and see if any messages came in or look in the DMS for any new data
⚠️ **GitHub.com Fallback** ⚠️