Skip to content

Commit e08e521

Browse files
Update README.rst to include usage example for periodic data acquisition.
1 parent 8c4e85a commit e08e521

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.rst

+27
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,33 @@ 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 start periodically measuring the temperature
67+
and humidity at a set interval and retrieve the stored measurements:
68+
69+
.. code:: python
70+
71+
sensor.mode = 'Periodic'
72+
print(sensor.temperature)
73+
print(sensor.relative_humidity)
74+
75+
You can adjust the frequency at which the sensor periodically gathers data to:
76+
0.5, 1, 2, 4 or 10 Hz. The following adjusts the frequency to 2 Hz:
77+
78+
.. code:: python
79+
80+
sensor.frequency = 2
81+
82+
83+
The sensor is capable of storing eight results. The sensor stores these
84+
results in an internal FILO cache.
85+
86+
The sensor will continue to collect data at the set interval until it is
87+
returned to single shot data acquisition mode:
88+
89+
.. code:: python
90+
91+
sensor.mode = 'Single'
92+
6693
Contributing
6794
============
6895

0 commit comments

Comments
 (0)