RPi Examples - Infineon/radar-bgt60 GitHub Wiki

The following examples are provided for the Raspberry Pi:

:warning: Important: Before running these examples make sure that all requirements are installed properly as explained here.

motionDetection

Description

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.

Hardware Setup

In order to setup the hardware correctly check the following section.

Compile

:information_source: Please open the example source file at src/framework/raspberrypi/examples/motionDetection.cpp and read the comments first before compiling it. :information_source:

Change to the Raspberry Pi framework folder:

cd src/framework/raspberrypi

Clean if any other example was compiled before:

make clean

Compile the example:

make examples/motionDetection

Run the example:

../../../build/motionDetection

directionDetection

Description

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.

Hardware Setup

In order to setup the hardware correctly check the following section.

Compile

:information_source: Please open the example source file at src/framework/raspberrypi/examples/directionDetection.cpp and read the comments first before compiling it. :information_source:

Change to the Raspberry Pi framework folder:

cd src/framework/raspberrypi

Clean if any other example was compiled before:

make clean

Compile the example:

make example/directionDetection

Run the example:

../../../build/directionDetection

interruptMode

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.

Hardware Setup

In order to setup the hardware correctly check the following section.

Compile

:information_source: Please open the example source file at src/framework/raspberrypi/examples/interruptMode.cpp and read the comments first before compiling it. :information_source:

Change to the Raspberry Pi framework folder:

cd src/framework/raspberrypi

Clean if any other example was compiled before:

make clean

Compile the example:

make examples/interruptMode

Run the example:

../../../build/interruptMode