I cant get any data from my system to the teensy. I currently have the CAN hooked up to my system (white HIGH, Blue Low, Orange is ground)
I am using CAN 1 on the dual CAN board. any reason why I'm not seeing anything?
the message i am sending over is ID 0x265 16bit long start bit 0, Little Endian (Intel) and its just a constant 12.345 to see if anything works.
Any ideas as to why this isn't working?
I am using CAN 1 on the dual CAN board. any reason why I'm not seeing anything?
the message i am sending over is ID 0x265 16bit long start bit 0, Little Endian (Intel) and its just a constant 12.345 to see if anything works.
Any ideas as to why this isn't working?
Code:
#include <IFCT.h>
void setup() {
pinMode(2, OUTPUT); // for the transceiver enable pin
Can1.setBaudRate(1000000);
Can1.enableFIFO();
}
void loop() {
CAN_message_t msg;
if ( Can1.read(msg) ) canSniff(msg);
}
void canSniff(const CAN_message_t &msg) {
Serial.print("MB "); Serial.print(msg.mb);
Serial.print(" LEN: "); Serial.print(msg.len);
Serial.print(" EXT: "); Serial.print(msg.flags.extended);
Serial.print(" REMOTE: "); Serial.print(msg.rtr);
Serial.print(" TS: "); Serial.print(msg.timestamp);
Serial.print(" ID: "); Serial.print(msg.id, HEX);
Serial.print(" Buffer: ");
for ( uint8_t i = 0; i < msg.len; i++ ) {
Serial.print(msg.buf[i], HEX); Serial.print(" ");
} Serial.println();
}