Py Getting Started - Infineon/radar-bgt60 GitHub Wiki
This page explains how to install and use the Python wrapper for the BGT60 radar library with the Raspberry Pi.
- Experience level: moderate
- Basic linux user level
- Basic programming skills in Python
Name | Picture |
BGT60LTR11AIP | |
Compatible Raspberry Pi | |
8GB + microSD card for Raspberry Pi |
- Raspberry Pi OS or similar
- Git
- bcm2835 library
- pybind11 library
- python3 (tested with python3.7)
- pip (for easy installation)
- build-essential
- Infineon's radar-bgt60 library (this library)
The BGT60 needs to be connected with wires to a compatible Raspberry Pi. One wiring example is depicted below. If you want to use different pins, you have have to change the desired pins in the constructor of the library.
Note
Set up a Raspberry Pi with Raspberry Pi OS or similar OS. Check this website for instructions.
You can access your Raspberry Pi either using a monitor and a keyboard or using SSH in a headless setup as described here.
Now insert the microSD card into your Raspberry Pi and turn on the power supply to boot it up. The BGT60 will be powered by the Raspberry Pi due to the connected pins.
This library can be installed easily using pip
. If you do not have pip
installed, you can install it by typing the following commands into the terminal of your Raspberry Pi:
sudo apt-get install python3-pip
Afterwards you can install the Infineon radar-bgt60-library by typing the following again in the terminal:
sudo pip3 install radar-bgt60
Once the library is installed clone the radar-bgt60 repository.
git clone https://github.com/Infineon/radar-bgt60.git
Navigate to the example folder
cd radar-bgt60/src/framework/raspberrypi/examples_py
and execute the examples from the terminal:
sudo python3 detectMotion.py