Libelium's API

It is mandatory to include the CAN Bus library when using this module. The following line must be introduced at the beginning of the code:

#include <WaspCAN.h>

Waspmote's API CAN Bus files:

  • WaspCAN.cpp

  • WaspCAN.h

APIs functions

- Private functions:

The following functions are executed inside the API functions. In normal conditions, the user must NOT manage or use them.

- Data structure

This is a structure created inside the CAN Bus library. The structure fits with the standard CAN Bus frame, so it is used to create the message to send, or to receive messages from other devices.

typedef struct{
	unsigned int id;
		struct {
			char rtr: 1;
			char length: 4;
		}header;

	uint8_t data[8];
}messageCAN;

messageCAN messageRx;
messageCAN messageTx;

-Public functions:

- CAN in a Automation functions

The OBD-II standard sets some common PIDs for all cars, but it is not always respected. This is a list of useful functions for retreiving data from cars. Consult the specific PIDs in each car.

Last updated