Skip to content

Commit 35e680e

Browse files
Include support for periodic data acquisition mode and tuning the device's behaviour.
1 parent 40d5609 commit 35e680e

File tree

4 files changed

+359
-41
lines changed

4 files changed

+359
-41
lines changed

README.rst

+32
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,38 @@ And then you can start measuring the temperature and humidity:
6363
print(sensor.temperature)
6464
print(sensor.relative_humidity)
6565
66+
You can instruct the sensor to periodically measure the temperature and
67+
humidity, storing the result in its internal cache:
68+
69+
.. code:: python
70+
71+
sensor.mode = 'Periodic'
72+
73+
You can adjust the frequency at which the sensor periodically gathers data to:
74+
0.5, 1, 2, 4 or 10 Hz. The following adjusts the frequency to 2 Hz:
75+
76+
.. code:: python
77+
78+
sensor.frequency = 2
79+
80+
The sensor is capable of storing eight results. The sensor stores these
81+
results in an internal FILO cache. Retrieving these results is simlilar to
82+
taking a measurement. The sensor clears its cache once the stored data is read.
83+
The sensor always returns eight data points. The list of results is backfilled
84+
with the maximum output values of 130.0 ºC and 100.01831417975366 % RH:
85+
86+
.. code:: python
87+
88+
print(sensor.temperature)
89+
print(sensor.relative_humidity)
90+
91+
The sensor will continue to collect data at the set interval until it is
92+
returned to single shot data acquisition mode:
93+
94+
.. code:: python
95+
96+
sensor.mode = 'Single'
97+
6698
Contributing
6799
============
68100

0 commit comments

Comments
 (0)