This commit is contained in:
James 2024-04-25 22:37:43 +01:00
parent 451b71758a
commit 14bd3f1da8

View File

@ -24,15 +24,17 @@ bool gotCellInfo;
void loop() {
Serial.printf("\r\n\r\n===============================\r\n\r\n");
delay(1000);
Serial.println("Scanning...");
BLEScan* pBLEScan = BLEDevice::getScan(); // Create new scan
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()));
for (int i = 0; i < foundDevices.getCount(); i++) {
delay(1000);
Serial.printf("\r\n\r\n===============================\r\n\r\n");
BLEAdvertisedDevice advertisedDevice = foundDevices.getDevice(i);