Skip to content

Commit 79872a2

Browse files
initial repo load
1 parent a13056a commit 79872a2

File tree

1 file changed

+29
-11
lines changed

1 file changed

+29
-11
lines changed

README.rst

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,16 @@ Introduction
2121
A collection of CircuitPython helpers for calculating and converting temperature.
2222

2323

24-
Temperature Unit Converters...
24+
``Dew Point`` calculates dew point temperature from measured temperature (Celsius)
25+
and humidity (percent). Returns the calculated dew point (Celsius) and summary
26+
description. Detailed description is provided if ``verbose=True``. Dew point value
27+
is constrained to the range of 0 to 40 (Celsius).
2528

29+
``Heat Index`` calculates heat index temperature from measured temperature
30+
(Celsius) and humidity (percent). Returns the calculated heat index (Celsius)
31+
and summary description. Detailed description is provided if ``verbose=True``.
2632

33+
``Unit Converters`` convert values between Celsius, Fahrenheit, and Kelvin.
2734

2835

2936
.. image:: https://github.com/CedarGroveStudios/CircuitPython_AirQualityTools/blob/main/media/WARNING.jpg
@@ -69,21 +76,32 @@ Usage Example
6976

7077
.. code-block:: python
7178
72-
from cedargrove_airqualitytools.pm25_aqi import concentration_to_aqi
73-
from cedargrove_airqualitytools.co2... import co2...
74-
from cedargrove_airqualitytools.translate.english_to_francais import interpret
79+
from cedargrove_temperaturetools.dew_point import dew_point
80+
from cedargrove_temperaturetools.heat_index import heat_index
81+
from cedargrove_temperaturetools.unit_converters import (
82+
celsius_to_fahrenheit,
83+
celsius_to_kelvin,
84+
)
7585
76-
pm25_measurement = 10 # PM2.5 concentration of 10ppm; GOOD quality
86+
# Measured temperature and humidity
87+
TEMPERATURE = 24 # Degrees Celsius
88+
HUMIDITY = 50 # Relative humidity in percent
7789
78-
data_valid, aqi_value, aqi_color, aqi_desc = concentration_to_aqi(pm25_measurement)
90+
dew_point_temp, description = dew_point(TEMPERATURE, HUMIDITY)
91+
print(f"Dew Point = {dew_point_temp} {description}")
7992
80-
print(aqi_value, aqi_desc) # Print the AQI and description
81-
print(interpret(True, aqi_desc)) # Provide the description in Français (French)
93+
dew_point_temp, description = dew_point(TEMPERATURE, HUMIDITY, verbose=True)
94+
print(f"Dew Point = {dew_point_temp} {description}")
8295
83-
.. code-block:: python
96+
heat_index_temp, description = heat_index(TEMPERATURE, HUMIDITY)
97+
print(f"Heat Index = {heat_index_temp} {description}")
98+
99+
heat_index_temp, description = heat_index(TEMPERATURE, HUMIDITY, verbose=True)
100+
print(f"Heat Index = {heat_index_temp} {description}")
84101
85-
from cedargrove_airqualitytools.dewpoint import dewpoint...
86-
from cedargrove_airqualitytools.heatindex import heatindex...
102+
print(f"Measured Temperature (Celsius) = {TEMPERATURE}")
103+
print(f"Measured Temperature (Fahrenheit) = {celsius_to_fahrenheit(TEMPERATURE)}")
104+
print(f"Measured Temperature (Kelvin) = {celsius_to_kelvin(TEMPERATURE)}")
87105
88106
89107

0 commit comments

Comments
 (0)