Skip to content

Instantly share code, notes, and snippets.

@ksasao
ksasao / ContactTracingAppFinder.ino
Last active December 7, 2020 18:33
接触確認アプリが有効になっているかを調べるアプリです。数十センチ程度まで近づくと素早く点滅します。M5 Atom 用です。https://twitter.com/ksasao/status/1274385507565178885 参照。Apache 2.0ライセンスです。
#include <M5Atom.h>
#include <BLEDevice.h>
// Contact Tracing Bluetooth Specification (Apple/Google)
// https://blog.google/documents/58/Contact_Tracing_-_Bluetooth_Specification_v1.1_RYGZbKW.pdf
const char* uuid = "0000fd6f-0000-1000-8000-00805f9b34fb";
bool found = false;
class MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks {
void onResult(BLEAdvertisedDevice advertisedDevice) {