Hello,
I used Teensy3.5 with tranceiver MCP2551 and this library "pawelsky/FlexCAN_Library" but it did not work
i want make communication by CAN between 2 teensy3.5, the first for transming and the second for receiving
/--------can transmitter--------------
#include <FlexCAN.h>
#include <kinetis_flexcan.h>

const int baudRate=500000;
const int ledPin = 13;
const int delayTime=1000;
int count=1;


// create CAN object
FlexCAN myCAN(baudRate);
CAN_message_t message;
//CAN_message_t rxmsg;

void setup() {
// init CAN bus
myCAN.begin();
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin,HIGH);
Serial.begin(9600);
}
void loop() {
Serial.println("Message Sent");
message.buf[0] = count;
message.buf[1] = count + 1;
message.len = 2 ;
message.id = 0x2;
myCAN.write(message);
count++;
Serial.println(message.buf[0]);
Serial.println(message.buf[1]);

delay(delayTime);
}
//--------------------------
//--------can receiver-------------
#include <FlexCAN.h>
#include <kinetis_flexcan.h>

const int baudRate=500000;
const int ledPin = 13;
const int delayTime=1000;

// create CAN object
FlexCAN myCAN(baudRate);
//CAN_message_t message;
CAN_message_t rxmsg;

void setup() {
// init CAN bus
myCAN.begin();
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}

void loop() {
if (myCAN.available()){
Serial.println("Message Received");
myCAN.read(rxmsg);
Serial.println(rxmsg.buf[0]);
Serial.println(rxmsg.buf[1]);
}
delay(delayTime);
}

I can not receive any thing ?! thanks