 {
 pinMode(STARTRELAYPIN, OUTPUT);
 pinMode(HALLSENSOR1PIN, INPUT);
-pinMode(HALLSENSOR2PIN, INPUT);
+attachInterrupt(digitalPinToInterrupt(HALLSENSORPIN), sensorPulseCount, RISING);
 
 client.setServer(mqtt_server, 1883);
 client.setCallback(callback);

#define STOPTIME            10000   //Expected ramp down time, in MS
 /////////
#define STARTRELAYPIN       1      //pin locations
#define HALLSENSOR1PIN      5       //dual hall sensors to detect rotaion
#define HALLSENSOR2PIN      4
#define SECONDS             1000    //ms in seconds 

WiFiClient espClient;
PubSubClient client(espClient);
unsigned long now = 0 ;
unsigned long OTAUntilMillis = 0 ;

char msg[50];


/**************************************/

{
//wait for mqtt commands
//send out mqtt status
calculateRPM();
discSlipCheck();
//if commanded != actual caution torque slip
//if commanded != actual over time, report full error
