Skip to content

Commit 7459844

Browse files
committed
adjustment to demo range, improved output of range info at the start of the demo
1 parent 59e35ba commit 7459844

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

examples/Example06_DistanceBasicReadings/Example06_DistanceBasicReadings.ino

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ SparkFunXM125Distance radarSensor;
2929
// I2C default address
3030
uint8_t i2cAddress = SFE_XM125_I2C_ADDRESS;
3131

32-
// Presence range in mm used - 300mm to 4000mm (0.3 M to 4 M)
33-
#define MY_XM125_RANGE_START 300
34-
#define MY_XM125_RANGE_END 4000
32+
// Presence range in mm used - 500mm to 5000mm (0.5 M to 5 M)
33+
#define MY_XM125_RANGE_START 500
34+
#define MY_XM125_RANGE_END 5000
3535

3636
void setup()
3737
{
@@ -67,9 +67,12 @@ void setup()
6767
Serial.print(MY_XM125_RANGE_START);
6868
Serial.print("mm to ");
6969
Serial.print(MY_XM125_RANGE_END);
70-
Serial.println("mm");
71-
Serial.println();
72-
// New-line and 0.5 second delay for easier reading
70+
Serial.print("mm (");
71+
Serial.print(MY_XM125_RANGE_START * 0.001);
72+
Serial.print("m to ");
73+
Serial.print(MY_XM125_RANGE_END * 0.001);
74+
Serial.println("m )");
75+
7376
Serial.println();
7477
delay(500);
7578
}

0 commit comments

Comments
 (0)