Hello,
I’m currently working on the “Using Infineon’s Sense2GoL Pulse Radar Demo Board with Arduino https://www.infineon.com/dgdl/Infineon-AN605_Using_Demo_Sense2GoL_Pulse_with_Arduino-ApplicationNotes-v01_10-EN.pdf?fileId=5546d462700c0ae601708bd8d71f1440
I followed every step, but the result didn’t turn out as expected.
Board: DEMO Radar BB XMC4700
This is code Radar_Pulsed_Doppler_LED
#include <IFXRadarPulsedDoppler.h>
// IFX Radar Pulsed Doppler Object
IFXRadarPulsedDoppler tjuefire;
void myResultCallback()
{
uint8_t targetDirection = tjuefire.getDirection();
if(targetDirection == 1)
{
// turn on Red LED for departing target
digitalWrite(LED_GREEN, HIGH);
digitalWrite(LED_RED, LOW);
digitalWrite(LED_BLUE, HIGH);
}
else if(targetDirection == 2)
{
// turn on Green LED for approaching target
digitalWrite(LED_GREEN, LOW);
digitalWrite(LED_RED, HIGH);
digitalWrite(LED_BLUE, HIGH);
}
else if(tjuefire.targetAvailable() == true)
{
// turn on Blue LED for just normal motion with no meaningful direction
digitalWrite(LED_GREEN, HIGH);
digitalWrite(LED_RED, HIGH);
digitalWrite(LED_BLUE, LOW);
}
else
{
// turn off LEDs for no motion
digitalWrite(LED_GREEN, HIGH);
digitalWrite(LED_RED, HIGH);
digitalWrite(LED_BLUE, HIGH);
}
}
void setup() {
Serial.begin(500000);
// put your setup code here, to run once:
pinMode(LED_RED, OUTPUT);
// digitalWrite(LED_RED, HIGH);
pinMode(LED_GREEN, OUTPUT);
// digitalWrite(LED_GREEN, LOW);
pinMode(LED_BLUE, OUTPUT);
// digitalWrite(LED_BLUE, HIGH);
tjuefire.initHW();
tjuefire.registerResultCallback(myResultCallback);
tjuefire.begin();
}
void loop() {
// put your main code here, to run repeatedly:
tjuefire.run();
}
The LED doesn’t change according to motion.
Did I miss something?