For Telliskivi2 2014

Dependents:   Telliskivi2_2014

Fork of HumanInterface by Reiko Randoja

Revision:
4:0a82202bc5df
Parent:
2:1ef07b660873
Child:
5:64a46d67cb6e
--- a/HumanInterface.h	Tue Sep 02 15:31:07 2014 +0000
+++ b/HumanInterface.h	Fri Nov 21 18:19:47 2014 +0000
@@ -4,16 +4,16 @@
 #include "mbed.h"
 #include "PCA9555.h"
 #include "externalin.h"
-#include "ledout.h"
 #include "Serial.h"
 #include "PinDetect.h"
+#include "rgb-led-pca9555.h"
 
 class HumanInterface {
 public:
     HumanInterface(
         PCA9555 *ioExt,
-        unsigned int yellowLedPin, unsigned int blueLedPin, unsigned int redLedPin,
-        unsigned int greenLedPin, unsigned int orangeLedPin,
+        unsigned int redLed1Pin, unsigned int greenLed1Pin, unsigned int blueLed1Pin,
+        unsigned int redLed2Pin, unsigned int greenLed2Pin, unsigned int blueLed2Pin,
         PinName goalButtonPin, PinName startButtonPin, PinName ballSensePin
     ); 
     
@@ -31,16 +31,12 @@
     
     PCA9555 *extIO;
     
-    LedOut redLed;
-    LedOut blueLed;
-    LedOut yellowLed;
-    LedOut greenLed;
-    LedOut orangeLed;
+    RgbLed rgbLed1;
+    RgbLed rgbLed2;
     
     PinDetect buttonGoal;
     PinDetect buttonStart;
-    PinDetect inputBall;
-    
+    PinDetect inputBall;    
        
     //Functions that PinDetect will call
     void goalFall();
@@ -53,10 +49,9 @@
     int ballState;
    
     bool redBlinking;
-    bool blueBlinking;
-    bool yellowBlinking;
-    bool greenBlinking;
-    bool orangeBlinking;
+    bool goalBlinking;
+    
+    bool redState();
 
     Ticker ledTicker;