We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to build a key bowl which detects whether a certain keychain was placed in it by detecting the attached Tile tag via BLE.
What is the most energy-efficient yet reliable way to observe a peripheral’s RSSI?
Currently, I am scanning repeatedly, limited to 4x per second and the specific peripheral address I am interested in:
#include <ArduinoBLE.h> void setup() { Serial.begin(9600); while (!Serial); // wait Serial.println("setup"); BLE.begin(); BLE.setEventHandler(BLEDiscovered, discovered); BLE.scanForAddress("xx:yy:zz:aa:bb:cc", true); } void logDevice(BLEDevice dev) { Serial.print("BLE device found: "); Serial.print("address="); Serial.print(dev.address()); Serial.print(", rssi="); Serial.print(dev.rssi()); if (!dev.hasLocalName()) { Serial.println(""); return; } Serial.print(", name="); Serial.print(dev.localName()); Serial.println(""); } void discovered(BLEDevice dev) { BLE.stopScan(); logDevice(dev); delay(250); // ms BLE.scanForAddress("xx:yy:zz:aa:bb:cc", true); } void loop() { BLE.poll(1000); // ms }
I’m a bit hesitant to connect to the device, because I don’t want to disrupt any other functionality of the Tile.
Is there a better way than the approach displayed above?
Thanks,
The text was updated successfully, but these errors were encountered:
Hi @stapelberg,
Your sketch looks fine, are you planning to power your central via a battery?
If you are, and using a Arduino Nano 33 BLE board, please follow pull request #15 for more low power tricks.
Sorry, something went wrong.
Thanks for taking a look! Yes, I am planning to power the nano 33 BLE from a battery. Thanks for the pointer to the power saving PR :)
Merge pull request arduino-libraries#25 from FRASTM/wb55_sem
ed10763
Activate default clocks on the stm32wb
No branches or pull requests
I want to build a key bowl which detects whether a certain keychain was placed in it by detecting the attached Tile tag via BLE.
What is the most energy-efficient yet reliable way to observe a peripheral’s RSSI?
Currently, I am scanning repeatedly, limited to 4x per second and the specific peripheral address I am interested in:
I’m a bit hesitant to connect to the device, because I don’t want to disrupt any other functionality of the Tile.
Is there a better way than the approach displayed above?
Thanks,
The text was updated successfully, but these errors were encountered: