Versions Compared

Key

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

Purpose

Updates all CrcLib members and routines. This allows the CrcDuino to update its time, LEDs, buzzer, inputs, and any other continuous functionality like communicating with the CrcConnect module.

When to use

Must be called continuously in every code you write using the CrcLib library.

Where to use

In the void loop() part of your .ino file.

Note

This periodic function call is mandatory in the code for CrcLib functions to execute properly. It should be executed once per every 0 to 10ms. The simplest way to do so is to make sure that the void loop() part of the code is executed as fast as possible, or to call CrcLib::Update() during intentionally long loops.

Learn more in this articles.

Returns

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

Main prototype and parameters

static void Crc::CrcLib::Update()

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

  • No parameters needed.

Overloads

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

Examples

Expand
title#1: The most basic program you can upload in a CrcDuino board for it to be able to execute CrcLib functions properly.
Code Block
languagecpp
#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…

Articles liés

Filter by label (Content by label)
sorttitle
excerptTyperich content
cqllabel = "ar-crclib_fonct_utilitaires"