Mouse code for the MacroRat

Dependencies:   ITG3200 QEI

Revision:
4:b5b7836ca2b0
Child:
6:3d68fedd6fd9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.h	Fri Apr 28 02:13:24 2017 +0000
@@ -0,0 +1,43 @@
+#ifndef MAIN_H
+#define MAIN_H
+
+#include "mbed.h"
+#include "ITG3200.h"
+
+// Motors
+PwmOut left1(PB_7);
+PwmOut left2(PB_8);
+PwmOut right1(PA_10);
+PwmOut right2(PA_11);
+
+// RGB LED
+DigitalOut redLed(PC_0);
+DigitalOut blueLed(PC_1);
+DigitalOut greenLed(PC_2);
+
+// IRs
+DigitalOut IR_1(PB_1);
+DigitalOut IR_2(PB_13);
+DigitalOut IR_3(PB_0);
+DigitalOut IR_4(PB_14);
+
+// Receivers
+AnalogIn Rec_1(PC_5);
+AnalogIn Rec_2(PC_4);
+AnalogIn Rec_3(PA_6);
+AnalogIn Rec_4(PA_7);
+
+// Doing DEBUGGING
+#define DEBUGGING 1
+Serial serial(PC_6, PC_7);
+
+// Gyro
+ITG3200 gyro(PC_9, PA_8);
+
+volatile double reading = 0;
+
+int gyroX = 0;
+int gyroY = 0;
+int gyroZ = 0;
+
+#endif
\ No newline at end of file