Setting a "standard" transmission frequency?

Quick question about coding a target interval for specific messages.

I want to remove a number of modules from the HS CAN bus in my project car - and then largely replicate their function via an M2.

One particular ID appears on the bus approx every 60ms - so I want my replicated message to do the same.

How can I do that with the Due Can library?

The (super) basic code snippet below just seems to transmit whenever there is availability on the bus and ends up flooding it.



void loop()
byte i=0;
CAN_FRAME message; = 0x17E012B0;
message.rtr = 0;
message.extended = 1;
message.length = 8;[0] = 0x00;[1] = 0x10;[2] = 0x00;[3] = 0x00;[4] = 0x00;[5] = 0x00;[6] = 0x00;[7] = 0x00;


You just need to set up a timer to make it wait 60 seconds before transmitting again. Check out the Arduino example called “Blink without Delay”