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:
22:993821a4c396
Parent:
21:60c4fe94d79c
Child:
32:9a4046224b11
--- a/fpga.cpp	Wed Nov 25 19:21:12 2015 +0000
+++ b/fpga.cpp	Thu Nov 26 15:47:17 2015 +0000
@@ -140,7 +140,7 @@
  */
 void FPGA::moveSortingServo(SortingServoPositions position){
 	if (position == Haz){
-// HAZ = 23
+			// HAZ = 26
             bbRst.write(0);
             CLK();
             bbRst.write(1);
@@ -151,9 +151,7 @@
             CLK();
             bbOut.write(0);
             CLK();          // Address finish
-            bbOut.write(1);
-            CLK();
-            bbOut.write(1);
+            bbOut.write(0);
             CLK();
             bbOut.write(1);
             CLK();
@@ -161,6 +159,8 @@
             CLK();
             bbOut.write(1);
             CLK();
+            bbOut.write(1);
+            CLK();
             bbOut.write(0);
             CLK();
             bbOut.write(0);
@@ -185,7 +185,7 @@
             CLK();          //Number finish
             bbOut.write(0);
 	}else if (position == NonHaz){
-		// NON-HAZ = 73
+		// NON-HAZ = 60
             bbRst.write(0);
             CLK();
             bbRst.write(1);