Demo Team / Mbed 2 deprecated MurphyBat_LPC

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MurphyBat.hpp Source File

MurphyBat.hpp

00001 /*
00002  * MurphyBat.h
00003  *
00004  *  Created on: 5 Aug 2017
00005  *      Author: ciscer01
00006  */
00007 
00008 #ifndef MURPHYARM_MURPHYBAT_HPP_
00009 #define MURPHYARM_MURPHYBAT_HPP_
00010 
00011 #include <mbed.h>
00012 
00013 #define avg_size 1
00014 
00015 class MurphyBat {
00016 public:
00017     MurphyBat(PinName Ir1, PinName Ir2, PinName Ir3, PinName Ir4, PinName Actuator);
00018 
00019     void update();
00020     static void FireCb(MurphyBat *mb);
00021     void Fire(void);
00022 private:
00023 
00024     AnalogIn mIr1;
00025     AnalogIn mIr2;
00026     AnalogIn mIr3;
00027     AnalogIn mIr4;
00028     AnalogIn *BatIrIn[4];
00029     float BatIrVal[4][avg_size];
00030     float BatIrTh[4];
00031     int BatI;
00032     DigitalOut batActuator;
00033     Timeout batActuratorTimout;
00034     bool Fired;
00035 };
00036 
00037 #endif /* MURPHYARM_MURPHYBAT_HPP_ */