sr501/BH1750/mq-2/dht11

Dependencies:   mbed

Fork of sensors_2 by w mx

sensors.h

Committer:
Dennis_Yu
Date:
2018-09-09
Revision:
0:6dca851b4779
Child:
1:1197997ae0ea

File content as of revision 0:6dca851b4779:

#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