3
3
4
4
Using the Acconeer XM125 A121 60GHz Pulsed Coherent Radar Sensor.
5
5
6
- This example prints out the distance values of the 0 and 1 distance
6
+ This example prints out the distance values of the 0 distance
7
7
channels to the serial plotter tool in Arduino.
8
8
9
9
By: Madison Chodikov
@@ -28,20 +28,11 @@ SfeXM125 radarSensor;
28
28
// I2C default address
29
29
uint8_t i2cAddress = SFE_XM125_I2C_ADDRESS;
30
30
31
- // Setup Variables
32
- uint32_t startVal = 0 ;
33
- uint32_t endVal = 0 ;
34
- uint32_t numDistances = 9 ;
35
- uint32_t calibrateNeeded = 0 ;
36
- uint32_t measDistErr = 0 ;
37
-
38
31
// Error statuses
39
- uint32_t errorStatus = 0 ;
40
32
uint32_t distanceSetupError = 0 ;
41
33
42
34
// Distance Variables
43
35
uint32_t distancePeak0 = 0 ;
44
- uint32_t distancePeak1 = 0 ;
45
36
46
37
void setup ()
47
38
{
@@ -86,16 +77,11 @@ void loop()
86
77
87
78
// Read PeakX Distance and PeakX Strength registers for the number of distances detected
88
79
radarSensor.getDistancePeak0Distance (distancePeak0);
89
- radarSensor.getDistancePeak1Distance (distancePeak1);
90
80
91
81
// If a peak distance was detected, then read out the distance and strength
92
82
if (distancePeak0 != 0 )
93
83
{
94
- Serial.println (distancePeak0);
95
- }
96
- if (distancePeak1 != 0 )
97
- {
98
- Serial.println (distancePeak1);
84
+ Serial.prinlnt (distancePeak0);
99
85
}
100
86
101
87
// Half a second delay for easier readings
0 commit comments