NAME
Tinkerforge::BrickletMotionDetector - Device that reads out PIR motion detector
CONSTANTS
- DEVICE_IDENTIFIER
-
This constant is used to identify a Motion Detector Bricklet.
The get_identity() subroutine and the CALLBACK_ENUMERATE callback of the IP Connection have a device_identifier parameter to specify the Brick's or Bricklet's type.
- CALLBACK_MOTION_DETECTED
-
This constant is used with the register_callback() subroutine to specify the CALLBACK_MOTION_DETECTED callback.
- CALLBACK_DETECTION_CYCLE_ENDED
-
This constant is used with the register_callback() subroutine to specify the CALLBACK_DETECTION_CYCLE_ENDED callback.
- FUNCTION_GET_MOTION_DETECTED
-
This constant is used with the get_response_expected(), set_response_expected() and set_response_expected_all() subroutines.
- FUNCTION_GET_IDENTITY
-
This constant is used with the get_response_expected(), set_response_expected() and set_response_expected_all() subroutines.
FUNCTIONS
- new()
-
Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*.
- get_motion_detected()
-
Returns 1 if a motion was detected. How long this returns 1 after a motion was detected can be adjusted with one of the small potentiometers on the Motion Detector Bricklet, see :ref:`here <motion_detector_bricklet_sensitivity_delay_block_time>`.
There is also a blue LED on the Bricklet that is on as long as the Bricklet is in the "motion detected" state.
- get_identity()
-
Returns the UID, the UID where the Bricklet is connected to, the position, the hardware and firmware version as well as the device identifier.
The position can be 'a', 'b', 'c' or 'd'.
The device identifier numbers can be found :ref:`here <device_identifier>`. |device_identifier_constant|