Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed PID Sensorv2 xbeeCom
Diff: quadCommand/quadCommand.h
- Revision:
- 1:e4439be6e1b9
- Parent:
- 0:853ffcef6c67
--- a/quadCommand/quadCommand.h Wed Oct 15 04:59:58 2014 +0000
+++ b/quadCommand/quadCommand.h Sun Nov 02 19:18:55 2014 +0000
@@ -17,10 +17,10 @@
#define DOGTIMER 0.5f
// Motor constants.
-#define MOTOR1 PTA5 // Pin used for motor 1.
-#define MOTOR2 PTA4 // Pin used for motor 2.
-#define MOTOR3 PTA12 // Pin used for motor 3.
-#define MOTOR4 PTD4 // Pin used for motor 4.
+#define MOTOR1 PTA5 // PTA5 // Pin used for motor 1.
+#define MOTOR2 PTA4 // PTA4 // Pin used for motor 2.
+#define MOTOR3 PTA12 // PTA12 // Pin used for motor 3.
+#define MOTOR4 PTD4 // PTD4 // Pin used for motor 4.
// Xbee constants.
#define TXPIN PTA2 // Pin used for xbee TX.
@@ -89,18 +89,18 @@
void updateMotors(); // Send PID values to Motors
void readyMotors(); // Callback function for update
- com *myCom;
- Sensor *mpu;
- RGBled led;
- motor myMotor1;
- motor myMotor2;
- motor myMotor3;
- motor myMotor4;
- PID pidPitch;
+ com *myCom; // Serial
+ Sensor *mpu; // I2C
+ motor *myMotor1; // 1 PWM
+ motor *myMotor2; // 1 PWM
+ motor *myMotor3; // 1 PWM
+ motor *myMotor4; // 1 PWM
+ PID pidPitch;
PID pidRoll;
PID pidYaw;
- Timer time;
- Watchdog dog;
+ RGBled led; // 3 PWM
+ Timer time;
+ Watchdog dog; // Timer
Ticker motorProcess;
volatile bool need2update;