Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Current »

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

 #1: Display a color on the NeoPixel
#include <CrcLib.h>

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

  • No labels