delays
This commit is contained in:
parent
451b71758a
commit
14bd3f1da8
@ -24,15 +24,17 @@ bool gotCellInfo;
|
|||||||
void loop() {
|
void loop() {
|
||||||
Serial.printf("\r\n\r\n===============================\r\n\r\n");
|
Serial.printf("\r\n\r\n===============================\r\n\r\n");
|
||||||
|
|
||||||
|
delay(1000);
|
||||||
Serial.println("Scanning...");
|
Serial.println("Scanning...");
|
||||||
|
|
||||||
BLEScan* pBLEScan = BLEDevice::getScan(); // Create new scan
|
BLEScan* pBLEScan = BLEDevice::getScan(); // Create new scan
|
||||||
pBLEScan->setActiveScan(true); // Active scan uses more power, but get results faster
|
pBLEScan->setActiveScan(true); // Active scan uses more power, but get results faster
|
||||||
BLEScanResults foundDevices = pBLEScan->start(10); //seconds
|
BLEScanResults foundDevices = pBLEScan->start(5); //seconds
|
||||||
|
|
||||||
Serial.println("Devices found: " + String(foundDevices.getCount()));
|
Serial.println("Devices found: " + String(foundDevices.getCount()));
|
||||||
|
|
||||||
for (int i = 0; i < foundDevices.getCount(); i++) {
|
for (int i = 0; i < foundDevices.getCount(); i++) {
|
||||||
|
delay(1000);
|
||||||
Serial.printf("\r\n\r\n===============================\r\n\r\n");
|
Serial.printf("\r\n\r\n===============================\r\n\r\n");
|
||||||
|
|
||||||
BLEAdvertisedDevice advertisedDevice = foundDevices.getDevice(i);
|
BLEAdvertisedDevice advertisedDevice = foundDevices.getDevice(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user