18 lines
445 B
Python
18 lines
445 B
Python
# -*- coding: utf-8 -*-
|
|
from srnemqtt.constants import MAC
|
|
from srnemqtt.lib.feasycom_ble import BTLEUart
|
|
from srnemqtt.protocol import construct_read_request, write
|
|
|
|
with BTLEUart(MAC, timeout=1) as x:
|
|
print(x)
|
|
|
|
write(x, construct_read_request(0x0E, words=3))
|
|
x.read(3, timeout=1)
|
|
print(x.read(6, timeout=0.01))
|
|
x.read(2, timeout=0.01)
|
|
print(x.timeout)
|
|
|
|
# x.timeout = 2
|
|
|
|
# print(x.read())
|
|
# print(x.read(1))
|