MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
Public Member Functions | List of all members
MePIRMotionSensor Class Reference

Driver for Me PIR Motion Sensor module. More...

`#include <src/MePIRMotionSensor.h>`

Inheritance diagram for MePIRMotionSensor:
[legend]
Collaboration diagram for MePIRMotionSensor:
[legend]

## Public Member Functions
| MePIRMotionSensor ()
| MePIRMotionSensor (uint8_t port)
void | setpin (uint8_t ModePin, uint8_t SensorPin)
void | SetPirMotionMode (uint8_t ModePin)
bool | isHumanDetected ()
Public Member Functions inherited from MePort
| MePort (void)
| MePort (uint8_t port)
| MePort (uint8_t port, uint8_t slot)
uint8_t | getPort (void)
uint8_t | getSlot (void)
bool | dRead1 (uint8_t mode=INPUT)
bool | dRead2 (uint8_t mode=INPUT)
bool | dpRead1 (void)
bool | dpRead2 (void)
void | dWrite1 (bool value)
void | dWrite2 (bool value)
int16_t | aRead1 (void)
int16_t | aRead2 (void)
void | aWrite1 (int16_t value)
void | aWrite2 (int16_t value)
void | reset (uint8_t port)
void | reset (uint8_t port, uint8_t slot)
uint8_t | pin1 (void)
uint8_t | pin2 (void)
uint8_t | pin (void)
uint8_t | pin (uint8_t port, uint8_t slot)

## Additional Inherited Members
Protected Attributes inherited from MePort
uint8_t | s1
uint8_t | s2
uint8_t | _port
uint8_t | _slot

## Detailed Description

Driver for Me PIR Motion Sensor module.

Driver for Me PIR Motionn Sensor module.

Class: MePIRMotionSensor

Description
  Declaration of Class MePIRMotionSensor.

Copyright (C), 2012-2016, MakeBlock

## Constructor & Destructor Documentation

## ◆ MePIRMotionSensor() [1/2]

MePIRMotionSensor::MePIRMotionSensor | ( | void |  | ) |

Alternate Constructor which can call your own function to map the Motion Sensor device to arduino port, no pins are used or initialized here.

Parameters

  [in] | None |

## ◆ MePIRMotionSensor() [2/2]

MePIRMotionSensor::MePIRMotionSensor | ( | uint8_t | port | ) |

Alternate Constructor which can call your own function to map the Motion Sensor device to arduino port

Parameters

  [in] | port | - RJ25 port from PORT_1 to M2

## Member Function Documentation

## ◆ isHumanDetected()

bool MePIRMotionSensor::isHumanDetected | ( |  | ) |

Function
  isHumanDetected

Description
  Is human been detected.

Parameters

  [in] | None |

Output
  None

Return
  ture: human is detected false: no human been detected

Others
  None

## ◆ setpin()

void MePIRMotionSensor::setpin | ( | uint8_t | ModePin,
|  | uint8_t | SensorPin
| ) |  |

Function
  setpin

Description
  Reset the PIR motion sensor available PIN by its arduino port.

Parameters

  [in] | ModePin | - arduino port for BIS0001's A port
  [in] | SensorPin | - arduino port for BIS0001's Vo port

Output
  None

Return
  None

Others
  Set global variable _KeyPin and s2

## ◆ SetPirMotionMode()

void MePIRMotionSensor::SetPirMotionMode | ( | uint8_t | ModePin | ) |

Function
  SetPirMotionMode

Description
  Set PIR motion sensor's trigger mode.

Parameters

  [in] | ModePin | - 1: Retriggerable, 0: Unrepeatable trigger

Output
  None

Return
  None

Others
  None

The documentation for this class was generated from the following files:

- src/MePIRMotionSensor.h
- src/MePIRMotionSensor.cpp