Skip to content

Commit a7ebb41

Browse files
Example Cleanup
Cleaned up examples and adjusted some comments
1 parent 1ad2efa commit a7ebb41

File tree

3 files changed

+5
-19
lines changed

3 files changed

+5
-19
lines changed

examples/Example08_DistanceSerialPlotter/Example08_DistanceSerialPlotter.ino

+2-16
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
Using the Acconeer XM125 A121 60GHz Pulsed Coherent Radar Sensor.
55
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
77
channels to the serial plotter tool in Arduino.
88
99
By: Madison Chodikov
@@ -28,20 +28,11 @@ SfeXM125 radarSensor;
2828
// I2C default address
2929
uint8_t i2cAddress = SFE_XM125_I2C_ADDRESS;
3030

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-
3831
// Error statuses
39-
uint32_t errorStatus = 0;
4032
uint32_t distanceSetupError = 0;
4133

4234
// Distance Variables
4335
uint32_t distancePeak0 = 0;
44-
uint32_t distancePeak1 = 0;
4536

4637
void setup()
4738
{
@@ -86,16 +77,11 @@ void loop()
8677

8778
// Read PeakX Distance and PeakX Strength registers for the number of distances detected
8879
radarSensor.getDistancePeak0Distance(distancePeak0);
89-
radarSensor.getDistancePeak1Distance(distancePeak1);
9080

9181
// If a peak distance was detected, then read out the distance and strength
9282
if (distancePeak0 != 0)
9383
{
94-
Serial.println(distancePeak0);
95-
}
96-
if (distancePeak1 != 0)
97-
{
98-
Serial.println(distancePeak1);
84+
Serial.prinlnt(distancePeak0);
9985
}
10086

10187
// Half a second delay for easier readings

examples/Example09_DistanceAdvancedSettings/Example09_DistanceAdvancedSettings.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Example 4: Distance Basic Readings
2+
Example 9: Distance Advanced Settings
33
44
Using the Acconeer XM125 A121 60GHz Pulsed Coherent Radar Sensor.
55
@@ -67,7 +67,7 @@ void setup()
6767
{
6868
// Start serial
6969
Serial.begin(115200);
70-
Serial.println("XM125 Example 4: Basic Distance Readings");
70+
Serial.println("XM125 Example 9: Basic Advanced Settings");
7171
Serial.println("");
7272

7373
Wire.begin();

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SparkFun XM125 Arduino Library
2-
version=1.0.0
2+
version=1.0.1
33
author=SparkFun Electronics <techsupport@sparkfun.com>
44
maintainer=SparkFun Electronics <sparkfun.com>
55
sentence=An Arduino library to make use of the Qwiic XM125 A121 Pulsed Radar Module from Acconeer.

0 commit comments

Comments
 (0)