Local library

Dependencies:   WakeUp PinDetect

Dependents:   Inductive_Sensor Inductive_Sensor_Jasper Inductive_Sensor_3

Revision:
6:0e7c0ad0508b
Parent:
5:c2468a69aacb
Child:
7:0b23995256e7
--- a/Bob.h	Tue Apr 12 14:39:08 2016 +0000
+++ b/Bob.h	Wed Aug 24 10:30:41 2016 +0000
@@ -12,16 +12,27 @@
 */
 
 #include "mbed.h"
+#include "PinDetect.h"
 
 class Bob {
     public:
-        Bob(PinName led, PinName sd_enable, PinName sd_present, PinName battery, PinName V_Det);
     
+        /** Construct a new instance of the class Bob
+         * @param process_led   Pin connected to the green led, used for processing
+         * @param error_led     Pin connected to the red led, used for errors
+         * @param button        Pin connected to the I/O button
+         * @param sd_present    Pin connected to the SDCardDetect port
+         * @param battery       Pin connected to the battery
+         */
+        Bob(PinName process_led, PinName error_led, PinName button, PinName sd_present, PinName battery);
+        ~Bob();
+        
         bool checkSD(void);
         
+        void wakeup(void);
         void beforesleep(void);
         void sleep(uint32_t ms);
-        void wakeup(void);
+        
 
         float battery(void);
         
@@ -30,13 +41,13 @@
         void ledoff(void);
             
     private:
-        DigitalOut _led;
-        DigitalOut _sd_enable;
+        DigitalOut _led_process;
+        DigitalOut _led_error;
+        // DigitalOut _sd_enable;
         DigitalIn *_sd_card_detect;
+        PinDetect _button;
         
         AnalogIn  *_batt;
-        DigitalIn *_V_Det;
-
 
 };