Here is my code as it sits, My Serial monitor is still blank. I get 120ohms across the lines when i beep them out. I have a decent amount coming across that bus right now so I cant believe its not seeing anything.
is there a 0x0XX-0x999 range limit or something?
Code:
#include <IFCT.h>
void setup() {
pinMode(28, OUTPUT); // for the transceiver enable pin
digitalWrite(28,LOW);
Can0.setTX(ALT);
Can0.setRX(ALT);
Can0.setBaudRate(1000000);
Can0.enableFIFO();
}
void loop() {
CAN_message_t msg;
if ( Can0.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();
}