From 45cbb9227f81635f9d3006cd2005d215d365c2fd Mon Sep 17 00:00:00 2001 From: Carsten Schmiemann Date: Fri, 8 Dec 2023 02:27:16 +0100 Subject: [PATCH] assembled messages the copy paste way --- Easylink_CAN_Waker/doc/can_ids.cpp | 16728 ++++++++++++++++++++++++++ Easylink_CAN_Waker/src/can_ids.cpp | 1394 --- Easylink_CAN_Waker/src/main.cpp | 16735 ++++++++++++++++++++++++++- 3 files changed, 33457 insertions(+), 1400 deletions(-) create mode 100644 Easylink_CAN_Waker/doc/can_ids.cpp delete mode 100644 Easylink_CAN_Waker/src/can_ids.cpp diff --git a/Easylink_CAN_Waker/doc/can_ids.cpp b/Easylink_CAN_Waker/doc/can_ids.cpp new file mode 100644 index 0000000..d9ba2e9 --- /dev/null +++ b/Easylink_CAN_Waker/doc/can_ids.cpp @@ -0,0 +1,16728 @@ +data[1] = {0x00}; sndStat = CAN0.sendMsgBuf(0x4FA, 0, 1, data); + if(sndStat == CAN_OK){ + Serial.print("Message sent successfully: "); + for(i=0; i MCP_CAN CAN0(53); //Interrupt connected to D49 but not used +#define TX_DELAY 50 + +int i; +//byte data[8]; +byte sndStat; void setup() { @@ -15,16 +20,16734 @@ void setup() CAN0.setMode(MCP_NORMAL); // Change to normal mode to allow messages to be transmitted } -byte data[8] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}; - void loop() { - // send data: ID = 0x100, Standard CAN Frame, Data length = 8 bytes, 'data' = array of data bytes to send - byte sndStat = CAN0.sendMsgBuf(0x100, 0, 8, data); +byte data[8] = {0x00}; sndStat = CAN0.sendMsgBuf(0x4FA, 0, 1, data); if(sndStat == CAN_OK){ - Serial.println("Message Sent Successfully!"); + Serial.print("Message sent successfully: "); + for(i=0; i