File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
libraries/CAN/examples/CAN1Write Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ static uint32_t const CAN_ID = 0x20;
16
16
17
17
void setup ()
18
18
{
19
- // Serial.begin(115200);
20
- // while (!Serial) { }
19
+ Serial.begin (115200 );
20
+ while (!Serial) { }
21
21
22
22
/* You need to enable the CAN transceiver
23
23
* by commenting in below code when using
@@ -30,9 +30,9 @@ void setup()
30
30
digitalWrite (PIN_CAN1_STBY, LOW);
31
31
#endif
32
32
33
- if (!CAN1.begin (CanBitRate::BR_125k ))
33
+ if (!CAN1.begin (CanBitRate::BR_250k ))
34
34
{
35
- // Serial.println("CAN.begin(...) failed.");
35
+ Serial.println (" CAN.begin(...) failed." );
36
36
for (;;) {}
37
37
}
38
38
}
@@ -53,8 +53,8 @@ void loop()
53
53
*/
54
54
if (int const rc = CAN1.write (msg); rc < 0 )
55
55
{
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);
58
58
for (;;) { }
59
59
}
60
60
You can’t perform that action at this time.
0 commit comments