Local library

Dependencies:   WakeUp PinDetect

Dependents:   Inductive_Sensor Inductive_Sensor_Jasper Inductive_Sensor_3

Bob.h

Committer:
bobgiesberts
Date:
2016-03-30
Revision:
4:9c3c8eb56a2b
Parent:
3:68c005d410e1
Child:
5:c2468a69aacb

File content as of revision 4:9c3c8eb56a2b:

#ifndef _Bob_H_
#define _Bob_H_

/**
* @file Bob.h
* @brief collection of some functions to communicate
* with the processor board. LEDs, SD, etc.
*
* @author Bob Giesberts
*
* @date 2015-12-18
*/

#include "mbed.h"

class Bob {
    public:
        Bob(PinName redled, PinName greenled, PinName sd_enable, PinName sd_present, PinName battery, PinName V_Det);
    
        bool checkSD(void);
        
        void beforesleep(void);
        void sleep(uint32_t ms);
        void wakeup(void);

        float battery(void);
        void flash(int n);
        void flash_red(int n);
        void flash_green(int n);
        void red(void);
        void green(void);
        void redoff(void);
        void greenoff(void);
            
    private:
        DigitalOut _red;
        DigitalOut _green;
        DigitalOut _sd_enable;
        DigitalIn *_sd_card_detect;
        AnalogIn  *_batt;
        DigitalIn *_V_Det;
        
};

#endif