Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: WakeUp PinDetect
Dependents: Inductive_Sensor Inductive_Sensor_Jasper Inductive_Sensor_3
Diff: Bob.h
- Revision:
- 6:0e7c0ad0508b
- Parent:
- 5:c2468a69aacb
- Child:
- 7:0b23995256e7
diff -r c2468a69aacb -r 0e7c0ad0508b Bob.h
--- 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;
-
};