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: mbed
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_ */
Generated on Thu Jul 14 2022 01:42:13 by
1.7.2