z3ugma
08/27/2024, 7:43 PMjag run -d host sample.toit
SCAN_DURATION ::= Duration --ms=250
find_by_name central/ble.Central name/string:
central.scan --duration=SCAN_DURATION: | device/ble.RemoteScannedDevice |
if device.data.name and device.data.name.contains name:
return device.address
throw "no ring device found"z3ugma
08/27/2024, 7:45 PM// Copyright (C) 2023 Toitware ApS.
// Use of this source code is governed by a Zero-Clause BSD license that can
// be found in the examples/LICENSE file.
import ble
SCAN-DURATION ::= Duration --s=3
main:
adapter := ble.Adapter
central := adapter.central
addresses := []
central.scan --duration=SCAN-DURATION: | device/ble.RemoteScannedDevice |
addresses.add device.address
print addressesz3ugma
08/27/2024, 7:50 PMfloitsch
08/28/2024, 3:37 PMz3ugma
08/28/2024, 5:48 PMcm started that I don't get on the problem workstationz3ugma
08/28/2024, 5:48 PMVersion: v1.33.0
SDK version: v2.0.0-alpha.145
Build date: 2024-04-22T20:36:07Zkasperl
08/30/2024, 5:44 PMz3ugma
09/02/2024, 11:22 PMz3ugma
09/13/2024, 1:34 PMfloitsch
09/13/2024, 1:51 PMfloitsch
09/13/2024, 1:52 PMz3ugma
09/14/2024, 2:44 PM