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:
Mon Nov 17 21:31:42 2014 +0000
Revision:
12:814a8fdbb6f7
Parent:
6:e64796f1f384
Child:
14:31ba3e56c788
dispense and sort working well, also stored correct chip values

Who changed what in which revision?

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