diff --git a/examples/esp32can_receive/esp32can_receive.ino b/examples/esp32can_receive/esp32can_receive.ino index a8538f9..d533ee8 100644 --- a/examples/esp32can_receive/esp32can_receive.ino +++ b/examples/esp32can_receive/esp32can_receive.ino @@ -11,17 +11,17 @@ void setup() { void loop() { twai_message_t rx_frame; - ESP32Can.CANReadFrame(&rx_frame); + if (ESP32CAN_OK == ESP32Can.CANReadFrame(&rx_frame)) { /* CAN message received*/ + Serial.print(rx_frame.identifier, HEX); + Serial.print(" "); + Serial.print(rx_frame.data_length_code); + + for (int i=0; i