w mx
/
sensors3
sr501/BH1750/mq-2/dht11
Fork of sensors_2 by
Diff: sensors.h
- Revision:
- 0:6dca851b4779
- Child:
- 1:1197997ae0ea
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sensors.h Sun Sep 09 13:44:05 2018 +0000 @@ -0,0 +1,24 @@ +#ifndef SENSORS_H +#define SENSORS_H + +#include "mbed.h" +//#include <stdlib.h> + +class sr501 +{ +/***** + * 红外热释电对象 + * 感应输出高电平 +*****/ + private: +// DigitalIn signal; + bool status; + InterruptIn signal; + void triggered(); + public: + sr501(PinName pSignal); + bool operator ==(const bool &target); + void reset(); +}; + +#endif