-
Notifications
You must be signed in to change notification settings - Fork 3
Py Examples
The following examples show how to use the Python wrapper of the radar-bgt60 library with the BGT60LTR11AIP shield together with the Raspberry Pi.
Note:- Before running the examples the Raspberry Pi needs to be ready with the library installed and the repository cloned as described here.
Please open the example source files at src/framework/raspberrypi/examples_py/*.py
and read the comments before compiling it.
This example shows how to check for motion with the radar sensor. For this we use the simple getMotion()
function continuously in the loop to check if a motion was detected or not.
In order to setup the hardware correctly check the following section.
ℹ️ Please open the example source file at src/framework/raspberrypi/examples_py/motionDetection.py
and read the comments first before compiling it. ℹ️
Change to the Python examples folder:
cd src/framework/raspberrypi/examples_py
Now you can simply run the example code:
python3 motionDetection.py
This example shows how to determine the direction of the detected motion in front of the radar sensor. It uses the getDirection()
function of the library and is calling it continuously in the loop to check the direction of the detected motion.
In order to setup the hardware correctly check the following section.
ℹ️ Please open the example source file at src/framework/raspberrypi/examples_py/directionDetection.py
and read the comments first before compiling it. ℹ️
Change to the Python examples folder:
cd src/framework/raspberrypi/examples_py
Now you can simply run the code:
python3 directionDetection.py
This example shows you how to use the interrupt functionality of the library. Here, you can pass a user defined callback function to the class, which can then be used to check for motion and the direction of the motion.
In order to setup the hardware correctly check the following section.
ℹ️ Please open the example source file at src/framework/raspberrypi/examples_py/interruptMode.py
and read the comments first before compiling it. ℹ️
Change to the Python examples folder:
cd src/framework/raspberrypi/examples_py
Now you can simply run the code:
python3 interruptMode.py
Library Architecture
BGT60 API
PAL Interface
Source Tree Structure
Preprocessor Configuration
Porting Guide
Doxygen Docs
Arduino
- Getting Started
- Lib Installation
- Arduino API
- PlatformIO
Raspberry Pi (C++)
- Getting Started
- Lib Installation
- Raspberry Pi API
- Examples
Raspberry Pi (Python)
- Getting Started
- Lib Installation
- RPi Python API
- Examples