Problem with Seed-Studio_CAN library

Good Morning Everyone,

since i solved i like to share in order to help who face the same problem in future.
Making a bit more attention t the compilation error, indeed the fact that the function prototype require more input arguments is the relevant thing.

The right sintax is the following:

CAN.sendMsgBuf(0x1AF, 0, 0, 8, stmp);

sixth argument is configured with default value (leave as it is).

where: first, second, fourth and fifth arguments are the expected (id, extended frame or not indication, dlc and data vector).

The third argument is “critical”:
if is = 0 frome the RX node you can see the 8 bytes of the data vector as you expect form TX program, instead if you set = 1 it seems as ther is a “counter” that add the value of 2^{byte-index} or 2^{byte-index + 1} (in sequence) respect what you expect.

It seems a “service” of the method to emulate changing of the data frame (like in a real vehicle).

In any case, now it works.

I strongly suggest to update the tutorial!!

Bests,

Pierpaolo.

1 Like