Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 3 Next »

Purpose

Sets up the board to be able to run the CrcLib library properly.

When to use

Once in every code you write using the CrcLib library.

Where to use

At the beginning of your code execution, in the void setup() part of your .ino file, before everything else.

This function is mandatory in the code for CrcLib functions to execute properly.

Returns

This function does not return a value once it has completed its tasks.

Main prototype and parameters

static void Crc::CrcLib::Initialize()

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

  • No parameters needed.

Overloads

#1: Enable/disable the buzzer

static void Crc::CrcLib::Initialize(bool buzzer)

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

  • buzzer: if you want to enable the buzzer on boot

Examples

 #1: The most basic program you can upload in a CrcDuino board for it to be able to execute CrcLib functions properly.
#include <CrcLib.h>

using namespace Crc;

void setup() {
    CrcLib::Initialize();

    /* 
    The rest of your setup code
    ...
     */
}
void loop() {
    CrcLib::Update();
    
    /* 
    The rest of your looping code
    ...
    */
}

More on this function

There is sadly nothing more to be said about this function…

  • No labels