mirror of
https://github.com/Seeed-Studio/Seeed_Arduino_CAN.git
synced 2026-07-27 19:55:59 +00:00
Whitespaces
This commit is contained in:
@@ -10,25 +10,23 @@ void setup() {
|
||||
mcp2551.begin(CAN_125KBPS);
|
||||
Serial.println("------- CAN Read ----------");
|
||||
Serial.println("ID DLC DATA");
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
if (mcp2551.readMessage(&canMsg) == MCP_CAN::ERROR_OK) {
|
||||
|
||||
|
||||
Serial.print(canMsg.can_id); // print ID
|
||||
|
||||
Serial.print(canMsg.can_dlc); // print DLC
|
||||
|
||||
for(int i = 0; i<canMsg.can_dlc; i++) { // print the data
|
||||
for (int i = 0; i<canMsg.can_dlc; i++) { // print the data
|
||||
|
||||
Serial.print(canMsg.data[i]);
|
||||
Serial.print(" ");
|
||||
Serial.print(canMsg.data[i]);
|
||||
Serial.print(" ");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Serial.println();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user