 	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;
 

	hallC3 = digitalRead(hc3);

	time = millis();
	curSpeedC = 1/(3 * (time - timeoldC));
	timeoldC = time;
	oldSpeedC = curSpeedC;


int C1bot = A1;
int C2bot = A2;
int C3bot = A3;

//struct Motor_Struct {
//  int top1;
//  int top2;
//  int top3;
//  int bot1;
//  int bot2;
//  int bot3;
//  
//  int h1;
//  int h2;
//  int h3;
//  
//  volatile double curSpeed;
//  
//  volatile int timeold;
//  
//  volatile int hall1, hall2, hall3;
//  
//  double pid_setpoint, pid_input, pid_output;
//};

//Hall effect sensors
int ha1 = 2;
