Multitasking arduino with CAN bus inputs

Of course here it is.

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

#define LED 7 //LED PIN
#define LED2 6
#define Brake_Pedal 0x70 // value for Brake Pedal 
#define Ebrake 0x00      // value for Ebrake 
#define CAN_INT 2

long unsigned int rxId = 0x488;  // brake pedal
long unsigned int rxId2 = 0x500; // Ebrake
unsigned char len = 0;
unsigned char rxBuf[8];

MCP_CAN CAN0(9);                          // Set CS to pin 9

void setup()
{
  Serial.begin(115200);
  if (CAN0.begin(MCP_STDEXT, CAN_500KBPS, MCP_16MHZ) == CAN_OK) Serial.print("MCP2515 Init Okay!!\r\n");
  else Serial.print("MCP2515 Init Failed!!\r\n");
  pinMode(2, INPUT);                       // Setting pin 2 for /INT input
  pinMode(LED, OUTPUT);
  pinMode(LED2, OUTPUT);

  //setup filters to receive only CAN ID 0x512
  CAN0.init_Mask(0, 0, 0x07FF0000);              // Init first mask...
  CAN0.init_Filt(0, 0, 0x05120000);              // Init first filter...

  CAN0.init_Mask(1, 0, 0x07FF0000);              // Init second mask...
  CAN0.init_Filt(2, 0, 0x05140000);              // Init third filter...



  CAN0.setMode(MCP_NORMAL);                // Change to normal mode to allow messages to be transmitted
}

void loop()
{
  if (!digitalRead(2))                   // If pin 2 is low, read receive buffer
  {
    CAN0.readMsgBuf(&rxId, &len, rxBuf); // Read data: len = data length, buf = data byte(s)
    Serial.print("ID: ");
    Serial.print(rxId, HEX);
    Serial.print(" Data: ");
    for (int i = 0; i < len; i++)        // Print each byte of the data
    {
      if (rxBuf[i] < 0x10)               // If data byte is less than 0x10, add a leading zero
      {
        Serial.print("0");
      }
      Serial.print(rxBuf[i], HEX);
      Serial.print(" ");
    }
    Serial.println();
    if (rxId)
    {
      if  (rxBuf[4] == Brake_Pedal)
      {
        digitalWrite(LED, HIGH); //LED ON
        delay (500);
      }
      else {
        digitalWrite(LED, LOW); //LED OFF
        delay (500);
      }
      if (rxId2)
      {
        if  (rxBuf[7] == Ebrake)
        {
          digitalWrite(LED2, HIGH); //LED ON
          delay (500);
        }
        else {
          digitalWrite(LED2, LOW); //LED OFF
          delay (500);
        }
      }
    }
  }
}