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

Committer:
IonSystems
Date:
Fri Nov 07 20:16:23 2014 +0000
Revision:
6:e64796f1f384
Child:
12:814a8fdbb6f7
Recovered from the attack of Euan

Who changed what in which revision?

UserRevisionLine numberNew contents of line
IonSystems 6:e64796f1f384 1 #include "mbed.h"
IonSystems 6:e64796f1f384 2 int redAmount;
IonSystems 6:e64796f1f384 3 int greenAmount;
IonSystems 6:e64796f1f384 4 int blueAmount;
IonSystems 6:e64796f1f384 5
IonSystems 6:e64796f1f384 6 void readChipNumbers(){
IonSystems 6:e64796f1f384 7 redAmount = readFile(0);
IonSystems 6:e64796f1f384 8 greenAmount = readFile(1);
IonSystems 6:e64796f1f384 9 blueAmount = readFile(2);
IonSystems 6:e64796f1f384 10 }
IonSystems 6:e64796f1f384 11
IonSystems 6:e64796f1f384 12 void decrementRed(){
IonSystems 6:e64796f1f384 13 redAmount--;
IonSystems 6:e64796f1f384 14 }
IonSystems 6:e64796f1f384 15 void decrementGreen(){
IonSystems 6:e64796f1f384 16 greenAmount--;
IonSystems 6:e64796f1f384 17 }
IonSystems 6:e64796f1f384 18 void decrementBlue(){
IonSystems 6:e64796f1f384 19 blueAmount--;
IonSystems 6:e64796f1f384 20 }
IonSystems 6:e64796f1f384 21
IonSystems 6:e64796f1f384 22 void incrementRed(){
IonSystems 6:e64796f1f384 23 redAmount++;
IonSystems 6:e64796f1f384 24 }
IonSystems 6:e64796f1f384 25 void incrementGreen(){
IonSystems 6:e64796f1f384 26 greenAmount++;
IonSystems 6:e64796f1f384 27 }
IonSystems 6:e64796f1f384 28 void incrementBlue(){
IonSystems 6:e64796f1f384 29 blueAmount++;
IonSystems 6:e64796f1f384 30 }