Skip to content

Instantly share code, notes, and snippets.

#include <SPI.h>
#include <MFRC522.h>
// this is configured for an Arduino Mega. Check any of the example sketches of the MFRC522
// to check the pinouts
#define RST_PIN 5
#define SS_PIN 53
MFRC522 mfrc522(SS_PIN, RST_PIN);
#include <mcp_can.h>
#include <SPI.h>
long unsigned int rxId;
unsigned char len = 0;
unsigned char rxBuf[8];
char msgString[128];
#define CAN0_INT 2
MCP_CAN CAN0(10);
import os
try:
import serial
except ImportError:
os.system("apt-get install python-serial")
import serial
ValueMax = 0
ValueMin = 1000