From 1935258e5868d262d8705bf8e93acd8490808e1e Mon Sep 17 00:00:00 2001 From: nick Date: Mon, 12 Aug 2019 11:23:33 -0500 Subject: [PATCH] required change for compatibility with Leonardo and probably other boards --- examples/receive_interrupt/receive_interrupt.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/receive_interrupt/receive_interrupt.ino b/examples/receive_interrupt/receive_interrupt.ino index 344f409..5992f75 100644 --- a/examples/receive_interrupt/receive_interrupt.ino +++ b/examples/receive_interrupt/receive_interrupt.ino @@ -28,7 +28,9 @@ char str[20]; void setup() { SERIAL.begin(115200); - + while (!SERIAL) { + ; // wait for serial port to connect. Needed for native USB port only + } while (CAN_OK != CAN.begin(CAN_500KBPS)) // init can bus : baudrate = 500k { SERIAL.println("CAN BUS Shield init fail");