diff --git a/examples/CAN_SpeedTest/CAN_SpeedTest.ino b/examples/CAN_SpeedTest/CAN_SpeedTest.ino index 140ac2b..df35c67 100644 --- a/examples/CAN_SpeedTest/CAN_SpeedTest.ino +++ b/examples/CAN_SpeedTest/CAN_SpeedTest.ino @@ -9,7 +9,6 @@ unsigned long oldTime = 0; void setup() { Serial.begin(115200); - SPI.begin(); mcp2515.reset(); mcp2515.setBitrate(CAN_125KBPS); @@ -19,7 +18,6 @@ void setup() { } void loop() { - if (mcp2515.readMessage(&canMsg) == MCP2515::ERROR_OK) { cntr++; } @@ -30,5 +28,4 @@ void loop() { Serial.println(" msg/sec"); cntr = 0; } - } diff --git a/examples/CAN_read/CAN_read.ino b/examples/CAN_read/CAN_read.ino index b43e56a..074d9c6 100644 --- a/examples/CAN_read/CAN_read.ino +++ b/examples/CAN_read/CAN_read.ino @@ -7,7 +7,6 @@ MCP2515 mcp2515(10); void setup() { Serial.begin(115200); - SPI.begin(); mcp2515.reset(); mcp2515.setBitrate(CAN_125KBPS); @@ -18,22 +17,17 @@ void setup() { } void loop() { - if (mcp2515.readMessage(&canMsg) == MCP2515::ERROR_OK) { - Serial.print(canMsg.can_id, HEX); // print ID Serial.print(" "); Serial.print(canMsg.can_dlc, HEX); // print DLC Serial.print(" "); for (int i = 0; i