/* IMPORTANT: USE ARDUINO PIN 3 FOR PWM INPUT. Also make sure your input is protected by at least a resistor, 100kohm, if its a 5v pwm signal. If 12v you may want a level shifter
or at minimum a voltage divider.
MAKE SURE TO SET OUTPUT MODE ON HALTECH TO DUTY CYCLE.
*/
#include "mcp_can.h"
#include <SPI.h>
MCP_CAN CAN(9); //default for those can bus shields
#define CAN_INT 2 //default for those can bus shields
char msgString[128];//terrible way of comparing data
long unsigned int rxId;//ID of incoming message
long unsigned int hi = 0x1B200002;
unsigned char len = 0;//not used here, since we dont care about contents of message
unsigned char rxBuf[8];//not used here, since we dont care about contents of message
unsigned char keepAlive[8] = {0x00, 0x00, 0x22, 0xE0, 0x41, 0x90, 0x00, 0x00};//counter KA
unsigned char speed[8] = {0xBB, 0x00, 0x3F, 0xFF, 0x06, 0xE0, 0x00, 0x00};//counter KA
unsigned char slowRollTable[4] = { 0x00, 0x40, 0x80, 0xC0};
This file has been truncated. show original