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:
6:98fe30430194
Parent:
4:4eebb4de22a7
Child:
7:b6e31bfdb2af
--- a/fpga.h	Mon Nov 16 01:26:41 2015 +0000
+++ b/fpga.h	Mon Nov 16 05:10:17 2015 +0000
@@ -1,15 +1,29 @@
+//
+// fpga.h
+// Created by Chandan Siyag on 14/11/2015.
+#include "globals.h"
 
 #ifndef _fpag_h_
 #define _fpga_h_
 
-int checkForBlock();
-int blockIsLarge();
+class FPGA{
+public:
+	FPGA();
 
-void moveStoppingServo(int position);
-void moveSortingServo(int position);
+	int checkForBlock();
+	int checkForSize();
+
+	void moveStoppingServo(StoppingServoPositions position);
+	void moveSortingServo(SortingServoPositions position);
 
-void resetStoppingServo();
-void resetSortingServo();
-void resetAllServos();
+	void resetStoppingServo();
+	void resetSortingServo();
+	void resetAllServos();
 
-#endif
\ No newline at end of file
+private:
+	int getBeamValue(int beamNumber);
+	void moveServo(int servoNumber, int position);
+
+	virtual ~FPGA();
+};
+#endif