Skip to content

Commit

Permalink
Create BLETest.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs authored Dec 29, 2024
1 parent c25135f commit 44bf24a
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions extras/BLETest/BLETest.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#include <Arduino.h>
#include "BleSensors.h"

// List of known sensors' BLE addresses
#define KNOWN_BLE_ADDRESSES \
{ \
"a4:c1:38:b8:1f:7f" \
}

std::vector<std::string> knownBLEAddresses;

void setup()
{
Serial.begin(115200);
Serial.setDebugOutput(true);
Serial.println("BLETest");

knownBLEAddresses = KNOWN_BLE_ADDRESSES;
BleSensors bleSensors = BleSensors(knownBLEAddresses);
unsigned ble_scantime = 31;
bool ble_active = false;

for (const std::string &s : knownBLEAddresses)
{
(void)s;
log_d("%s", s.c_str());
}

bleSensors.getData(ble_scantime, ble_active);
}

void loop()
{
delay(100);
}

0 comments on commit 44bf24a

Please sign in to comment.