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:
27:47a7bc902587
Parent:
23:f9e7e64784be
--- a/mbedLCD.h	Thu Dec 04 12:31:23 2014 +0000
+++ b/mbedLCD.h	Thu Dec 04 22:05:18 2014 +0000
@@ -7,7 +7,9 @@
 MCP23017 *par_port;
 WattBob_TextLCD *lcd;
 
-
+/*  void printLCD(const char * text)
+ *  Take a character array and split and trim it into two lines, to be displayed on the WattBob LCD screen.
+ */
 void printLCD(const char * text)
 {
     std::string txt_str = std::string(text); //Convert ther character array to a std::string,
@@ -35,6 +37,9 @@
 
 }
 
+/*  void printLCD(string txt_str)
+ *  Take a string and split and trim it into two lines, to be displayed on the WattBob LCD screen.
+ */
 void printLCD(string txt_str)
 {
     lcd->reset();
@@ -59,7 +64,9 @@
     }
 
 }
-
+/*  void setupLCD()
+ *  Setup the I2C communication line to the WattBob.
+ */
 void setupLCD()
 {
     par_port = new MCP23017(p9, p10, 0x40);
@@ -68,7 +75,9 @@
     lcd = new WattBob_TextLCD(par_port);
     lcd->reset();
 }
-
+/*  void printStoresChipValues()
+ *  Print out the values of the stored chip values to the LCD.
+ */
 void printStoredChipValues()
 {
     stringstream strs;
@@ -80,6 +89,6 @@
     strs << ", B:";
     strs << blueAmount;
     string temp_str = strs.str();
-    char const* pchar = temp_str.c_str(); //dont use cast
+    char const* pchar = temp_str.c_str();
     printLCD(pchar);
 }
\ No newline at end of file