kopia lustrzana https://github.com/micropython/micropython-lib
bluetooth/aioble/examples/temp_sensor.py: Properly notifies on update.
rodzic
661efa48f0
commit
13875c36aa
|
@ -39,7 +39,7 @@ def _encode_temperature(temp_deg_c):
|
|||
async def sensor_task():
|
||||
t = 24.5
|
||||
while True:
|
||||
temp_characteristic.write(_encode_temperature(t))
|
||||
temp_characteristic.write(_encode_temperature(t), send_update=True)
|
||||
t += random.uniform(-0.5, 0.5)
|
||||
await asyncio.sleep_ms(1000)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue