check if msg received
This commit is contained in:
parent
579c15cc95
commit
d9edd16d7a
1 changed files with 9 additions and 9 deletions
|
@ -11,8 +11,7 @@ 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);
|
||||
|
@ -22,6 +21,7 @@ void loop() {
|
|||
}
|
||||
|
||||
Serial.println();
|
||||
}
|
||||
|
||||
delay(1000);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue