MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
MePIRMotionSensor.h
Go to the documentation of this file.
1
40#ifndef MePIRMotionSensor_H
41#define MePIRMotionSensor_H
42
43#include <stdint.h>
44#include <stdbool.h>
45#include <Arduino.h>
46#include "MeConfig.h"
47
48#ifdef ME_PORT_DEFINED
49#include "MePort.h"
50#endif // ME_PORT_DEFINED
51
57#ifndef ME_PORT_DEFINED
58 class MePIRMotionSensor
59#else // !ME_PORT_DEFINED
60class MePIRMotionSensor : public MePort
61#endif // ME_PORT_DEFINED
62{
63 public:
64#ifdef ME_PORT_DEFINED
71 MePIRMotionSensor();
72
78 MePIRMotionSensor(uint8_t port);
79#else // ME_PORT_DEFINED
87 MePIRMotionSensor(uint8_t ModePin,uint8_t SensorPin);
88#endif // ME_PORT_DEFINED
105 void setpin(uint8_t ModePin,uint8_t SensorPin);
106
121 void SetPirMotionMode(uint8_t ModePin);
122
138 bool isHumanDetected();
139 private:
140 static volatile uint8_t _SensorPin;
141 static volatile uint8_t _ModePin;
142};
143#endif // MePIRMotionSensor_H
144
MeConfig.h
Configuration file of library.
MePort.h
Header for MePort.cpp module.
MePIRMotionSensor
Driver for Me PIR Motion Sensor module.
Definition MePIRMotionSensor.h:62
MePIRMotionSensor::MePIRMotionSensor
MePIRMotionSensor()
Definition MePIRMotionSensor.cpp:56
MePIRMotionSensor::isHumanDetected
bool isHumanDetected()
Definition MePIRMotionSensor.cpp:153
MePIRMotionSensor::SetPirMotionMode
void SetPirMotionMode(uint8_t ModePin)
Definition MePIRMotionSensor.cpp:129
MePort
Port Mapping for RJ25.
Definition MePort.h:128