mcp2515 help !

Hi guys I am hoping for some help in regards to sending a can packet to my car, I have everything set up and its working fine i have all the data packets that i want. For now all i want to send is one data packet that turns the exterior lights on which i have achieved but the sent packet turns on and off because its conflicting with the ecu. The ecu turns off the packet i sent because the ecu believes this is its true state and this causes the packet i sent to act as if it were a blinking led (on and off)…This was explained well to me by a person on this forum.

1: Does anyone have any advice on how to overcome this?
2: Is their a way to stop the ecu interfering?
Attached is the shorted version of the code i am using in order to only send one packet for test purposes, Any advice of a better way to go about this would be excellent. :slight_smile:

#include <mcp_can.h>
#include <SPI.h>

/*SAMD core*/
#ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
    #define SERIAL SerialUSB
#else
    #define SERIAL Serial
#endif

// the cs pin of the version after v1.1 is default to D9
// v0.9b and v1.0 is default D10
const int SPI_CS_PIN = 10;
unsigned char len = 0;
unsigned char UNLOCK[2] = {0x02, 0x80};
unsigned char LIGHTS[7] = {0x00, 0x00, 0xC0, 0x00, 0x10, 0x00, 0x00}; //lights on code  305
unsigned char LOCK[3] = {0x8F, 0x96, 0x7F};
MCP_CAN CAN(SPI_CS_PIN);                                    // Set CS pin

void setup() {
    SERIAL.begin(115200);

    while (CAN_OK != CAN.begin(CAN_33KBPS)) {            // init can bus : baudrate = 500k
        SERIAL.println("CAN BUS Shield init fail");
        SERIAL.println(" Init CAN BUS Shield again");
        delay(100);
    }
    SERIAL.println("CAN BUS Shield init ok!");
}

void loop() {

         CAN.sendMsgBuf(0x305, 0, 7, LIGHTS);
         
        
}