Skip to content

Commit 37ae4ed

Browse files
committed
Re-enabling serial output for CAN1Write.
1 parent 57e8810 commit 37ae4ed

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libraries/CAN/examples/CAN1Write/CAN1Write.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ static uint32_t const CAN_ID = 0x20;
1616

1717
void setup()
1818
{
19-
//Serial.begin(115200);
20-
//while (!Serial) { }
19+
Serial.begin(115200);
20+
while (!Serial) { }
2121

2222
/* You need to enable the CAN transceiver
2323
* by commenting in below code when using
@@ -30,9 +30,9 @@ void setup()
3030
digitalWrite(PIN_CAN1_STBY, LOW);
3131
#endif
3232

33-
if (!CAN1.begin(CanBitRate::BR_125k))
33+
if (!CAN1.begin(CanBitRate::BR_250k))
3434
{
35-
//Serial.println("CAN.begin(...) failed.");
35+
Serial.println("CAN.begin(...) failed.");
3636
for (;;) {}
3737
}
3838
}
@@ -53,8 +53,8 @@ void loop()
5353
*/
5454
if (int const rc = CAN1.write(msg); rc < 0)
5555
{
56-
//Serial.print ("CAN.write(...) failed with error code ");
57-
//Serial.println(rc);
56+
Serial.print ("CAN.write(...) failed with error code ");
57+
Serial.println(rc);
5858
for (;;) { }
5959
}
6060

0 commit comments

Comments
 (0)