Skip to content

Commit

Permalink
Include support for periodic data acquisition mode and tuning the dev…
Browse files Browse the repository at this point in the history
…ice's behaviour.
  • Loading branch information
WoefulDerelict committed Aug 7, 2019
1 parent 40d5609 commit b472235
Show file tree
Hide file tree
Showing 4 changed files with 360 additions and 41 deletions.
32 changes: 32 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,38 @@ And then you can start measuring the temperature and humidity:
print(sensor.temperature)
print(sensor.relative_humidity)
You can instruct the sensor to periodically measure the temperature and
humidity, storing the result in its internal cache:

.. code:: python
sensor.mode = 'Periodic'
You can adjust the frequency at which the sensor periodically gathers data to:
0.5, 1, 2, 4 or 10 Hz. The following adjusts the frequency to 2 Hz:

.. code:: python
sensor.frequency = 2
The sensor is capable of storing eight results. The sensor stores these
results in an internal FILO cache. Retrieving these results is simlilar to
taking a measurement. The sensor clears its cache once the stored data is read.
The sensor always returns eight data points. The list of results is backfilled
with the maximum output values of 130.0 ºC and 100.01831417975366 % RH:

.. code:: python
print(sensor.temperature)
print(sensor.relative_humidity)
The sensor will continue to collect data at the set interval until it is
returned to single shot data acquisition mode:

.. code:: python
sensor.mode = 'Single'
Contributing
============

Expand Down
Loading

0 comments on commit b472235

Please sign in to comment.