The MBED firmware used on the Chipin sorter, developed over 12 weeks for a 3rd year university systems project. Chipin is a token sorter, it sorts tokens by colours and dispenses them to order through an online booking system and card reader. This program interfaces with an FPGA, PC and LCD screen to control the sorter. The sorter has an operation mode where it can process orders when a card is entered into the machine. There is also a maintenance mode where the device responds to maintenance instructions such as 'dispense all'. More information at http://www.ionsystems.uk/

Dependencies:   MCP23017 TCS3472_I2C WattBob_TextLCD mbed-rtos mbed

Revision:
8:b7771391adc9
Parent:
7:6ba00694f9cd
Child:
12:814a8fdbb6f7
--- a/stateMachine.h	Mon Nov 10 15:03:20 2014 +0000
+++ b/stateMachine.h	Mon Nov 10 16:32:44 2014 +0000
@@ -3,9 +3,16 @@
     //Initializing state
     INITIALISING,
     
-    //File States
-    READING_RGB_VALUES,
-    WRITING_RGB_VALUES,
+    //Stored value states
+    READING_RGB_VALUES,     //read stored values from MBED datafile
+    WRITING_RGB_VALUES,     //write stored values to MBED datafile
+    INCREMENT_RED,
+    INCREMENT_GREEN,
+    INCREMENT_BLUE,
+    DECREMENT_RED,
+    DECREMENT_GREEN,
+    DECREMENT_BLUE,
+    
     
     //Dispensing states
     DISPENSE_RED,
@@ -34,7 +41,23 @@
     DISPLAY_SORTING,        //Display a 'currently sorting' message.
     DISPLAY_DISPENSING,     //Display a 'dispensing' message.
     
+    //PC States
+    WAITING_FOR_ACK,
+    WAITING_FOR_CHAR,
     //External LCD States
     
-    
+    //Maintenance mode states
+    RB_LEFT,
+    RB_CENTRE,
+    RB_RIGHT,
+    GO_UP,
+    GO_CENTRE,
+    GO_DOWN,
+    BR_LEFT,
+    BR_RIGHT,
+    R_PUSH,
+    R_HOME,
+    GB_LEFT,
+    GB_CENTRE,
+    GB_RIGHT
     };
\ No newline at end of file