Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions examples/CAN_write/CAN_write.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down