Clear up Arduino examples for all Arduino boards

This commit is contained in:
Anson He
2020-12-10 17:10:14 +08:00
committed by Baozhu Zuo
parent 3ff9e1b4c3
commit c11356b4e5
13 changed files with 162 additions and 45 deletions
+13 -4
View File
@@ -12,16 +12,25 @@
#endif
//#define CAN_2515
#define CAN_2518FD
#define CAN_2515
// #define CAN_2518FD
// the cs pin of the version after v1.1 is default to D9
// v0.9b and v1.0 is default D10
// Set SPI CS Pin according to your hardware
// For Wio Terminal w/ MCP2518FD RPi Hat
// Channel 0 SPI_CS Pin: BCM 8
// Channel 1 SPI_CS Pin: BCM 7
// Interupt Pin: BCM25
// *****************************************
// For Arduino MCP2515 Hat:
// SPI_CS Pin: D9
#ifdef CAN_2518FD
#include "mcp2518fd_can.h"
const int SPI_CS_PIN = BCM8;
const int CAN_INT_PIN = BCM25;
const int SPI_CS_PIN = 9;
const int CAN_INT_PIN = 2;
mcp2518fd CAN(SPI_CS_PIN); // Set CS pin
#endif