Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Purpose

Set the color of the NeoPixel.

When to use

Whenever

Where to use

Anywhere

Returns

N/A

Main prototype and parameters

void CrcLib::SetColor(const Color color)

The following parameters must be passed to the function for it to work properly:

  • The color to set the NeoPixel (see the Color page)

Overloads

This function does not have any overloads. It can only be used as described by the main prototype.

Examples

Expand
title#1: Display a color on the NeoPixel
Code Block
#include <CrcLib.h>

CrcLib::Timer timer;
void setup() {
    CrcLib::Initialize();
    timer.Start(2000);
}

void loop() {
    CrcLib::Update();

    if (timer.IsFinished()) { // 2s has elapsed
        CrcLib::SetColor(BLUE_LOW);
    }
}

Content by Label