Skip to content

Commit 81b620f

Browse files
authored
Update motionDetector_simple.ino
1 parent 388d6d7 commit 81b620f

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

motionDetector_simple.ino

+6-10
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,22 @@ void setup(){
1515
motionDetector_config(64, 16, 3, 3, false);
1616
Serial.setTimeout(1000);
1717

18-
if (WiFi.waitForConnectResult() != WL_CONNECTED) {
19-
Serial.println("Wifi connection failed");
20-
WiFi.disconnect(false);
21-
delay(1000);
22-
WiFi.begin(ssid, password);
23-
}
18+
if (WiFi.waitForConnectResult() != WL_CONNECTED) {Serial.println("Wifi connection failed");WiFi.disconnect(false);delay(1000);WiFi.begin(ssid, password);}
19+
2420
} // End of setup.
2521

2622
void loop()
2723
{
2824
motionDetector_set_minimum_RSSI(-80); // Minimum RSSI value to be considered reliable. Default value is 80 * -1 = -80.
2925
motionLevel = 0; // Reset motionLevel to 0 to resume motion tracking.
30-
motionLevel = motionDetector_esp(); // if the connection fails, the radar will automatically try to switch to different operating modes by using ESP32 specific calls.
26+
motionLevel = motionDetector_esp(); // if the connection fails, the motion detector will automatically try to switch to different operating modes by using ESP32 specific calls.
3127
//Serial.print("Motion detected & motion level is: ");Serial.println(motionLevel);
3228

3329
if (motionLevel > motionThreshold) // Adjust the sensitivity of motion sensor.Higher the number means less sensetive motion sensor is.
3430
{Serial.print("Motion detected & motion level is: ");Serial.println(motionLevel);}
3531

36-
if (enableCSVgraphOutput > 0) { // Use Tools->Serial Plotter to graph the live data!
37-
motionDetector_enable_serial_CSV_graph_data(enableCSVgraphOutput); // output CSV data only
38-
}
32+
if (enableCSVgraphOutput > 0) // Use Tools->Serial Plotter to graph the live data!
33+
{motionDetector_enable_serial_CSV_graph_data(enableCSVgraphOutput);} // output CSV data only
34+
3935
delay(500);
4036
} // End of loop.

0 commit comments

Comments
 (0)