 	hallB3 = digitalRead(hb3);
 
 	time = millis();
-	curSpeedB = 1/(3 * (time - timeoldB));
+	curSpeedB = 1/(3 * (time - timeoldB)); // just remove the 3
+        // 3 digital rotations per single mechanical rotation
+        curSpeedB *= 3;
 	timeoldB = time;
 	oldSpeedB = curSpeedB;
 

	hallA2 = digitalRead(ha2);
	hallA3 = digitalRead(ha3);
	time = millis();
	curSpeedA = 1/(3 * (time - timeoldA));
	timeoldA = time;
	oldSpeedA = curSpeedA;



#include <PID_v1.h>

//#include "motor_struct.h"



//Pin definitions
