MacOS - r41d/ClusterDuck-Protocol GitHub Wiki

CDP and Apple

This page documents the steps to install Arduino IDE on macOS, set up your Dev environment, and prepare to upload the CDP on your electronics. This page will go through:

  • Part One: Install Arduino IDE on MacOS
  • Part Two: Install Libraries and Dependencies
  • Part Three: Upload CDP to electronics.

Some helpful links:

  • MacOS installation video
  • TTGO CH9102 driver fix here

Mac OS Big Sur Fix If your IDE does not compile because of an ESPtool.py problem run the following commands in order and then restart Arduino IDE: mkdir -p ~/Documents/Arduino/hardware/espressif && \
cd ~/Documents/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 --depth 1 && \
cd esp32 && \
git submodule update --init --recursive --depth 1 && \
cd tools && \
python get.py

wiki-section-border

Part One: Install the Arduino IDE on MacOS

  1. Download and install the Arduino IDE and make sure to select MacOS

  2. Install the Silicon Labs USB to UART Bridge VCP Driver From Downloads Page. Note: Make sure Silicon Labs has the necessary security preferences (go to System Preferences -> Security and Privacy -> General and allow Silicon Labs).

  3. Install the ESP32 core Library by opening the Arduino IDE menu and go to [File] > [Preferences]. In [Additional Boards Manager URLs] add the following string: https://dl.espressif.com/dl/package_esp32_index.json,https://adafruit.github.io/arduino-board-index/package_adafruit_index.json - if there is already a URL here, add a comma at the end and then add this URL.

  4. Next, you will need to load the ESP32 Boards to your Arduino IDE. From Arduino IDE menu, select [Tools] > [Board] > [Boards Manager], Search for "esp32". You should see the "esp32" by Espressif Systems" library. Install this library.

Board ESP32

wiki-section-border

Part Two: Install Libraries and Dependencies

There are 3 different methods you can use to install libraries and dependencies on your machine. If you have SSH enabled on your GitHub, we recommend method A: Script installation as it will be the fastest and easiest. Method B: Manual Install, or Method C: Zip Install will also work if you prefer either of those.

Method A. Script Installation

  1. Make sure SSH is enabled on your laptop with your GitHub Account, if not instructions to setup here
  2. Fork the ClusterDuck Protocol source code (This repository)
  3. Copy and run the following command in your terminal and change it to your github username curl -s https://clusterduckprotocol.org/assets/Wiki_Script/MacOs.sh | bash -s <YOUR GITHUB USERNAME>
  4. Done!

Method B. Manual Install

  1. Open up a terminal or a git command prompt
  2. git clone --recursive https://github.com/Call-for-Code/ClusterDuck-Protocol.git
  3. Run inside the copied 'ClusterDuck-Protocol' the following git submodule update --init --recursive
  4. Copy the ClusterDuck-Protocolfolder into your local Arduino Libraries folder /Users/USER/Documents/Arduino/libraries.
  5. Navigate into the ClusterDuck-Protocol folder and open the Libraries folder
  6. Copy all the libraries form the ClusterDuck-Protocol Libraries folder and Paste it into your local Arduino IDE Libraries folder _/Users/USER/Documents/Arduino/libraries_.
  7. Open Arduino IDE
  8. You should now be able to see the examples by going to File -> Examples -> ClusterDuck Protocol

You should be able to pull new commits directly to this folder in your Arduino library.


Method C. Zip Install

Go to the following websites and download the Libraries:

To add Libraries by zip files. Go to Sketch > include Library > add .zip Library…

wiki-section-border

Part Three: Upload CDP to Electronics

Now follow these steps to get started inside the Arduino IDE