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:
24:8868101d01d0
Parent:
23:f9e7e64784be
Child:
27:47a7bc902587
--- a/mbedStorage.h	Sat Nov 29 16:32:57 2014 +0000
+++ b/mbedStorage.h	Wed Dec 03 17:49:41 2014 +0000
@@ -4,7 +4,7 @@
 void writeFile(int r, int g, int b, int re)
 {
 
-    FILE* file = fopen("/local/datafile.txt","w"); // open file
+    FILE* file = fopen("/local/df.txt","w"); // open file
     if(r >= 0) {
         fputc(r, file); // put char (data value) into file
     } else {
@@ -31,7 +31,7 @@
 
 int readFile(int index)
 {
-    FILE* file = fopen ("/local/datafile.txt","r"); // open file for reading
+    FILE* file = fopen ("/local/df.txt","r"); // open file for reading
     int read_var = 0;
     for(int i = 0; i <= index; i++) {
         read_var = fgetc(file); // read data value