Update constants. Possibly the final one.
This commit is contained in:
		
							parent
							
								
									023e78bd1c
								
							
						
					
					
						commit
						adb0aa79a7
					
				
					 1 changed files with 7 additions and 7 deletions
				
			
		|  | @ -4,9 +4,9 @@ QTRSensors qtr; | |||
| const uint8_t SensorCount = 8; | ||||
| uint16_t sensorValues[SensorCount]; | ||||
| 
 | ||||
| float Kp = 0.09; //set up the constants value
 | ||||
| float Ki = 0.0009; | ||||
| float Kd = 0.3; | ||||
| float Kp = 0.085; //set up the constants value
 | ||||
| float Ki = 0.00004; | ||||
| float Kd = 0.65; | ||||
| int P; | ||||
| int I; | ||||
| int D; | ||||
|  | @ -15,14 +15,14 @@ int lastError = 0; | |||
| boolean onoff = false; | ||||
| 
 | ||||
| //Increasing the maxspeed can damage the motors - at a value of 255 the 6V motors will receive 7,4 V 
 | ||||
| const uint8_t maxspeeda = 150; | ||||
| const uint8_t maxspeedb = 150; | ||||
| const uint8_t maxspeeda = 125; | ||||
| const uint8_t maxspeedb = 125; | ||||
| const uint8_t basespeeda = 100; | ||||
| const uint8_t basespeedb = 100; | ||||
| 
 | ||||
| // adding minspeed so it can reverse
 | ||||
| const int minspeeda = -150; | ||||
| const int minspeedb = -150; | ||||
| const int minspeeda = -125; | ||||
| const int minspeedb = -125; | ||||
| 
 | ||||
| //Set up the drive motor carrier pins
 | ||||
| int mode = 8; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue