Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CAN_write.ino #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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