Carloop Object

Learn how to properly call all functions from the Carloop library.

Create a global Carloop object and specify the hardware revision (CarloopRevision2). Find this information on the Carloop circuit board (R2.1 means revision 2).

#include "carloop/carloop.h"
Carloop<CarloopRevision2> carloop;

void setup()
{
    carloop.begin();
}

void loop()
{
    carloop.update();
    CANMessage message;
    if(carloop.can().receive(message)) {
        // Do awesome things with message!
    }
}