Latest version of my quadcopter controller with an LPC1768 and MPU9250.

Dependencies:   mbed

Currently running on a custom PCB with 30.5 x 30.5mm mounts. There are also 2 PC apps that go with the software; one to set up the PID controller and one to balance the motors and props. If anyone is interested, send me a message and I'll upload them.

Revision:
3:a49ab9168fb2
Parent:
1:53628713ede9
Child:
4:fab65ad01ab4
--- a/main.cpp	Mon Jul 09 19:18:20 2018 +0000
+++ b/main.cpp	Tue Jul 10 13:19:53 2018 +0000
@@ -132,7 +132,6 @@
 	float temp = 0;
 	float temp2 = 0;
 	float temp3 = 0;
-	float lptest = 0;
 	bool exit = true;
 	float noise = 0;
 	int count = 0;
@@ -142,10 +141,10 @@
 		
 		// Init pwm
 	motor1.period_ms(10);
-    motor1.pulsewidth_us(1000);
-    motor2.pulsewidth_us(1000);
-    motor3.pulsewidth_us(1000);
-    motor4.pulsewidth_us(1000);
+  motor1.pulsewidth_us(1000);
+  motor2.pulsewidth_us(1000);
+  motor3.pulsewidth_us(1000);
+  motor4.pulsewidth_us(1000);
 	
 	filter.begin(1500);
 	
@@ -320,6 +319,7 @@
 					print.stop();
 					print.reset();
 					print.start();
+					//led2 = !led2;
 				//	pc.printf("X: %.2f		Y: %.2f		%.0f\r\n", angles[0], angles[1], samplef);
 					pc.printf("%.2f		%.0f\r\n", angles[1], samplef);
 				}
@@ -328,7 +328,7 @@
 				if(rxd) {
 					led2 = !led2;
 					rxd = false;
-//					pc.printf("%d		%d		%d		%d\r\n", motor[0], motor[1], motor[2], motor[3]);
+	//				pc.printf("%d		%d		%d		%d\r\n", motor[0], motor[1], motor[2], motor[3]);
 				}
 				
 				if(rx_data[5] > 1650) ch_sw = 0;