From 821038cf1db6d95819f0be405b933bf768f539bf Mon Sep 17 00:00:00 2001 From: "Sergey V. DUDANOV" Date: Sat, 14 Sep 2024 15:06:32 +0400 Subject: [PATCH] discovering example --- examples/discovering.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 examples/discovering.py diff --git a/examples/discovering.py b/examples/discovering.py new file mode 100644 index 0000000000..66d9f98e16 --- /dev/null +++ b/examples/discovering.py @@ -0,0 +1,14 @@ +# Copyright 2024, Sergey Dudanov +# SPDX-License-Identifier: Apache-2.0 + +import asyncio + +from pyftms import discover_ftms_devices + + +async def run(): + async for dev, machine_type in discover_ftms_devices(): + print(f"Found {machine_type.name}: name: {dev.name}, address: {dev.address}") + + +asyncio.run(run())