Versions Compared

Key

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

This page presents the most basic programs that should first be tried out by every program when first getting their hands on a CrcDuino.

...

This is how Arduino IDE loads the CrcLib when compiling the code, allowing the use use its functions. This will of course only work if the library as first been properly installed as detailed here.

...

Code Block
languagecpp
using namespace Crc;

...

Code Block
languagecpp
#include <CrcLib.h>

using namespace Crc;

void setup()
{
    CrcLib::Initialize();
    Serial.begin(9600);  //Establishes a 9600 baud rate connection with the monitor.
}

void loop()
{
    CrcLib::Update();
    
    //Prints to the Serial monitor the Analog Input Port #1 value
    Serial.println(CrcLib::GetAnalogInput(CRC_ANA_1));
    
    //Prints the code execution time to the Serial monitor
    unsigned int deltaMicros = CrcLib::GetDeltaTimeMicros();
    Serial.println(deltaMicros);
}

Related articles

Filter by label (Content by label)
sorttitle
excerptTyperich content
cqllabel in ( "ar-crclib_en" , "ar-crclib_funct_utilities" )