move code between files
This commit is contained in:
		@@ -94,19 +94,10 @@ void setup() {
 | 
				
			|||||||
  pinMode(MotorPinB, OUTPUT);
 | 
					  pinMode(MotorPinB, OUTPUT);
 | 
				
			||||||
  pinMode(MotorSpeedB, OUTPUT);
 | 
					  pinMode(MotorSpeedB, OUTPUT);
 | 
				
			||||||
  pinMode(MotorBrakeB, OUTPUT);
 | 
					  pinMode(MotorBrakeB, OUTPUT);
 | 
				
			||||||
 | 
					 | 
				
			||||||
  half_revolutionsA = 0;
 | 
					 | 
				
			||||||
  rpmA = 0;
 | 
					 | 
				
			||||||
  timeoldA = 0;
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
  half_revolutionsB = 0;
 | 
					 | 
				
			||||||
  rpmB = 0;
 | 
					 | 
				
			||||||
  timeoldB = 0;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
void loop() {
 | 
					void loop() {
 | 
				
			||||||
  gyro_loop();
 | 
					  gyro_loop();
 | 
				
			||||||
  
 | 
					 | 
				
			||||||
  safe_angle = int(round(angle_pitch_output));
 | 
					  safe_angle = int(round(angle_pitch_output));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if(temp_loops>250){
 | 
					  if(temp_loops>250){
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -79,6 +79,14 @@ void gyro_setup(){
 | 
				
			|||||||
  delay(100);
 | 
					  delay(100);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  calibrateGyro();
 | 
					  calibrateGyro();
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  half_revolutionsA = 0;
 | 
				
			||||||
 | 
					  rpmA = 0;
 | 
				
			||||||
 | 
					  timeoldA = 0;
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  half_revolutionsB = 0;
 | 
				
			||||||
 | 
					  rpmB = 0;
 | 
				
			||||||
 | 
					  timeoldB = 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void gyro_loop(){
 | 
					void gyro_loop(){
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user