aboutsummaryrefslogtreecommitdiffstats
path: root/client/python/scan.py
diff options
context:
space:
mode:
authorBernhard Guillon <Bernhard.Guillon@begu.org>2024-12-25 00:34:42 +0100
committerBernhard Guillon <Bernhard.Guillon@begu.org>2024-12-29 19:54:53 +0100
commit1762c56956bafd6fc0636516b494dfa935ff8aec (patch)
tree5b693c0c70400b71c982401fd9693a48991d3c23 /client/python/scan.py
parent40404fb81dfad3f5c5cf567bb053796a9135165e (diff)
downloadwb3s-ble-nebula-galaxy-1762c56956bafd6fc0636516b494dfa935ff8aec.tar.gz
wb3s-ble-nebula-galaxy-1762c56956bafd6fc0636516b494dfa935ff8aec.zip
space_light: first version
TODO: pwm initialization is currently best guess could be wrong active low|high TODO: implement pairing TODO: implement timer TODO: use the button for something TODO: implement a better client
Diffstat (limited to 'client/python/scan.py')
-rw-r--r--client/python/scan.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/client/python/scan.py b/client/python/scan.py
new file mode 100644
index 0000000..b5e8531
--- /dev/null
+++ b/client/python/scan.py
@@ -0,0 +1,13 @@
+# Bluetooth LE scanner
+# Prints the name and address of every nearby Bluetooth LE device
+
+import asyncio
+from bleak import BleakScanner
+
+async def main():
+ devices = await BleakScanner.discover()
+
+ for device in devices:
+ print(device)
+
+asyncio.run(main())