Skip to content

Commit 1007209

Browse files
wangcoolcPillar1989
authored andcommitted
Modified mcp2515 send Blink ROS example
1 parent 41b9007 commit 1007209

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

examples/send_Blink_ROS/send_Blink_ROS.ino

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
// rostopic pub toggle_led std_msgs/Empty -r 100
99
1010

11-
12-
#include <mcp_can.h>
1311
#include <SPI.h>
14-
12+
#include "mcp2515_can.h"
1513
//ROS
1614
#include <ros.h>
1715
#include <std_msgs/Empty.h>
@@ -30,7 +28,7 @@ const int ledHIGH = 1;
3028
const int ledLOW = 0;
3129
unsigned char stmp[8] = {ledHIGH, 1, 2, 3, ledLOW, 5, 6, 7};
3230

33-
MCP_CAN CAN(SPI_CS_PIN); // Set CS pin
31+
mcp2515_can CAN(SPI_CS_PIN); // Set CS pin
3432

3533
void messageCb(const std_msgs::Empty& toggle_msg) {
3634
//digitalWrite(13, HIGH-digitalRead(13)); // blink the led

0 commit comments

Comments
 (0)