Skip to content

Getting Started

Cassandra "ZZ Cat" Robinson edited this page Mar 18, 2024 · 8 revisions

This guide will walk you through downloading CRSF for Arduino and adding it to your local Arduino libraries.

For PlatformIO users, the process is simpler and more straightforward.
For Arduino IDE users, the process is a bit more "hands-on".

In either case, both methods assume you have a basic knowledge of the development environment you are working with, and have installed the required development board support packages for your chosen target. Keep in mind that the majority of STM32 targets are only available via stm32duino, which is (sadly) not available to PlatformIO. This is the same reason why Earl Phillhower's version of RP2040 support is omitted from CRSF for Arduino, due to the fact that it is currently (almost) exclusively available to those that use the Arduino IDE.

Arduino IDE Users

Note

CRSF for Arduino is not yet supported in the Arduino Library Manager.
At this time, you are REQUIRED to install it manually.

  1. In my Releases section, Download the Source Code (ZIP) in the Assets section, and save to a convenient space on your hard drive.
  2. In the Arduino IDE, go to Sketch -> Include Library -> Add .ZIP Library...
  3. Click CRSFforArduino-1.0.2 and Arduino IDE will automatically install it for you.
  4. Build-test one of the examples. preferably the rc_channels example by File -> Examples -> CRSFforArduino -> rc_channels.
  5. Click Verify and the build should pass.

If you see an error flag what tells you that the library already exists (EG you're updating from an older version), delete the version of CRSF for Arduino that is currently there, then follow the above steps from 2 onwards.

PlatformIO Users

Note

CRSF for Arduino is not yet available in the PlatformIO Registry.

There are a few ways to install CRSF for Arduino in your project with PlatformIO.
The most straightforward method is the method described in the Library Dependency section.
The second method is through the Command Line.

In either case, you are REQUIRED to pay close attention to the Semantic Version tag. IE the hash tag representing the specified version of CRSF for Arduino you want to use.
A valid version tag looks like this: #vMAJOR.MINOR.PATCH.
Where, MAJOR is a representation of the Major release, MINOR is a representation of the Minor release, and PATCH is a representation of releases containing bug fixes.
EG: #v1.0.2 represents Version 1.0.2 of CRSF for Arduino.

Library Dependency

Simply copy the following link to your lib_deps section of your platformio.ini file:

https://github.com/ZZ-Cat/CRSFforArduino.git#MAJOR.MINOR.PATCH

Simply replace the MAJOR.MINOR.PATCH with the desired Version of CRSF for Arduino you want to use.

Via the Command Line

First time

If this is your first time installing CRSF for Arduino, you only need to type one command into your terminal and hit enter:

pio pkg install -l https://github.com/ZZ-Cat/CRSFforArduino.git#MAJOR.MINOR.PATCH

Simply replace the MAJOR.MINOR.PATCH with the desired Version of CRSF for Arduino you want to use.

Updating an older version

This method is a little bit more involved, because you are currently REQUIRED to "manually" delete your existing version of CRSF for Arduino.
First off, delete your existing version with:

pio pkg uninstall -l https://github.com/ZZ-Cat/CRSFforArduino.git#MAJOR.MINOR.PATCH

In this case, MAJOR, MINOR, and PATCH represent your current version of CRSF for Arduino.
If you're unsure of what version you have, you can print the version number to the Serial Monitor with the following functions in your setup() routine:

Serial.print("CRSF for Arduino version: ");
Serial.println(CRSFFORARDUINO_VERSION);

Next up, install the latest version with the following command:

pio pkg uninstall -l https://github.com/ZZ-Cat/CRSFforArduino.git#MAJOR.MINOR.PATCH

In this case, MAJOR.MINOR.PATCH represents the latest version number of CRSF for Arduino. EG #v1.0.2 represents Version 1.0.2.

Clone this wiki locally