3rd year group project. Electronic and Electrical Engineering. Heriot-Watt University. This is the code for the mbed for the Automatic Little Object Organiser (ALOO).

Dependencies:   MCP23017 TCS3472_I2C WattBob_TextLCD mbed

Revision:
28:7e4d29977d72
Parent:
27:2cb1bdb7ae3d
Child:
29:9c0339e3c593
--- a/globals.cpp	Tue Dec 01 16:16:26 2015 +0000
+++ b/globals.cpp	Tue Dec 01 20:54:26 2015 +0000
@@ -10,7 +10,7 @@
 int ColourSensorError = 0.5;
 //SerialBase gParity = SerialBase::None;
 int gStopBits = 1;
-float gIntegrationTime = 3;
+float gIntegrationTime = 2.5;
 int gToggleServoNumber = 0;
 float currentMinError[3] = {0,0,0};
 float currentMaxError[3] = {0,0,0};
@@ -24,7 +24,8 @@
 bool runColourSensorTest = false;
 bool getColourSensorValue = false;
 bool getBlockColourValue = false;
-int errorMultiplier = 2;
+bool pcModeChanged = false;
+int errorMultiplier = 1;
 int hazReadingCount = 1;
 
 PCModes currentMode = None;
@@ -139,8 +140,6 @@
         } while (higherBeam != 1);
         
         int colourValues[4];
-        
-        int colourValues[4];
     int averageColourValues[4] = {0, 0, 0, 0};
     int numberOfReadings = 3;
     for (int i = 0; i < 4; i++) {