Skip to content

Commit f2a11d6

Browse files
committed
Tutorial includes HDU21D.
1 parent 899153b commit f2a11d6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

TUTORIAL.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ These modules may be frozen as bytecode in the usual way, by placing the above
108108
5.3 [Using IORead to poll hardware](./TUTORIAL.md#53-using-ioread-to-poll-hardware)
109109

110110
5.4 [A complete example: aremote.py](./TUTORIAL.md#54-a-complete-example-aremotepy)
111+
A driver for an IR remote control receiver.
112+
113+
5.5 [Driver for HTU21D](./TUTORIAL.md#55-htu21d-environment-sensor) A
114+
temperature and humidity sensor.
111115

112116
6. [Hints and tips](./TUTORIAL.md#6-hints-and-tips)
113117

@@ -1123,6 +1127,18 @@ any asyncio latency when setting its delay period.
11231127

11241128
###### [Contents](./TUTORIAL.md#contents)
11251129

1130+
## 5.5 HTU21D environment sensor
1131+
1132+
This chip provides accurate measurements of temperature and humidity. The
1133+
driver is documented [here](./htu21d/README.md). It has a continuously running
1134+
task which updates `temperature` and `humidity` bound variables which may be
1135+
accessed "instantly".
1136+
1137+
The chip takes on the order of 120ms to acquire both data items. The driver
1138+
works asynchronously by triggering the acquisition and using
1139+
`await asyncio.sleep(t)` prior to reading the data. This allows other coros to
1140+
run while acquisition is in progress.
1141+
11261142
# 6 Hints and tips
11271143

11281144
## 6.1 Coroutines are generators

0 commit comments

Comments
 (0)