From aacb4225d82b6f00e10897b03d761ef9ececf447 Mon Sep 17 00:00:00 2001 From: AlessioSavelli <91372363+AlessioSavelli@users.noreply.github.com> Date: Fri, 12 May 2023 21:33:47 +0200 Subject: [PATCH] Update CAN_write.ino Added comments explaining how to use this example on Arduino MKR boards --- examples/CAN_write/CAN_write.ino | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/CAN_write/CAN_write.ino b/examples/CAN_write/CAN_write.ino index 5316951..a5b9b1e 100644 --- a/examples/CAN_write/CAN_write.ino +++ b/examples/CAN_write/CAN_write.ino @@ -4,8 +4,10 @@ struct can_frame canMsg1; struct can_frame canMsg2; MCP2515 mcp2515(10); - - +/*MKR Board example +#define Mhz *100000 +MCP2515 mcp2515(10, 10 Mhz); //Define my CS pin and SPI Speed +*/ void setup() { canMsg1.can_id = 0x0F6; canMsg1.can_dlc = 8; @@ -31,7 +33,7 @@ void setup() { while (!Serial); Serial.begin(115200); - + //mcp2515.begin(); //This function is only for MKR boards mcp2515.reset(); mcp2515.setBitrate(CAN_125KBPS); mcp2515.setNormalMode();