Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spelling fixes #232

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions documentation/boards/enviro-grow.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

A wireless monitoring system to help take good care of your plants. Monitor moisture levels with the soil sensors, or hook up pumps to make a whole auto-watering system!

Enviro Grow comes with three capacitive moisture sensors to monitor up to three pots or trays of seeds separately. Because there are no exposed electrodes, capacitive sensors are a lot less vulnerable to corrosion over time than old school resistive sensors. There's also a buzzer so it can signal your attention. The onboard sensors can measure temperature, humidity, pressure and light so you can finetune the growing conditions for your plants (you could also use the light sensor it to stop the buzzer from going off at night).
Enviro Grow comes with three capacitive moisture sensors to monitor up to three pots or trays of seeds separately. Because there are no exposed electrodes, capacitive sensors are a lot less vulnerable to corrosion over time than old school resistive sensors. There's also a buzzer so it can signal your attention. The onboard sensors can measure temperature, humidity, pressure and light so you can fine-tune the growing conditions for your plants (you could also use the light sensor it to stop the buzzer from going off at night).

## Readings

|Name|Parameter|Unit|Symbol|Example|
|---|---|---|---|---|
|Temperature|`temperature`|celcius|°C|`22.11`|
|Temperature|`temperature`|celsius|°C|`22.11`|
|Humidity|`humidity`|percent|%|`55.42`|
|Air Pressure|`pressure`|hectopascals|hPa|`997.16`|
|Luminance|`luminance`|lux|lx|`35`|
Expand Down
4 changes: 2 additions & 2 deletions documentation/boards/enviro-indoor.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

A wireless environmental monitoring board to keep track of inside conditions in your home, office or other habitat. Onboard sensors can measure temperature, humidity, pressure, gas and light.

The top of the range BME688 sensor on Enviro Indoor can measure temperature/humidity/pressure with a high degree of precision, and the gas scanner will react to changes in volatile organic compounds (VOCs), volatile sulfur compounds (VSCs) and the presence of carbon monoxide and hydrogen to give a general measure of air quality. The BH1745 light sensor can tell you the luminance and colour of light, so you could use it to detect unrestful blue light or adjust your lighting's intensity/hue depending on the time of day.
The top of the range BME688 sensor on Enviro Indoor can measure temperature/humidity/pressure with a high degree of precision, and the gas scanner will react to changes in volatile organic compounds (VOCs), volatile sulphur compounds (VSCs) and the presence of carbon monoxide and hydrogen to give a general measure of air quality. The BH1745 light sensor can tell you the luminance and colour of light, so you could use it to detect unrestful blue light or adjust your lighting's intensity/hue depending on the time of day.

## Readings

|Name|Parameter|Unit|Symbol|Example|
|---|---|---|---|---|
|Temperature|`temperature`|celcius|°C|`22.11`|
|Temperature|`temperature`|celsius|°C|`22.11`|
|Humidity|`humidity`|percent|%|`55.42`|
|Air Pressure|`pressure`|hectopascals|hPa|`997.16`|
|Gas Resistance|`gas_resistance`|ohms|Ω|`36551`|
Expand Down
2 changes: 1 addition & 1 deletion documentation/boards/enviro-urban.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Enviro Urban is an all in one board for checking up on all the airborne nasties

|Name|Parameter|Unit|Symbol|Example|
|---|---|---|---|---|
|Temperature|`temperature`|celcius|°C|`22.11`|
|Temperature|`temperature`|celsius|°C|`22.11`|
|Humidity|`humidity`|percent|%|`55.42`|
|Air Pressure|`pressure`|hectopascals|hPa|`997.16`|
|Noise|`noise`|voltage|V|`0.87`|
Expand Down
2 changes: 1 addition & 1 deletion documentation/boards/enviro-weather.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Enviro Weather is a super slimline all in one board for keeping a (weather) eye

|Name|Parameter|Unit|Symbol|Example|
|---|---|---|---|---|
|Temperature|`temperature`|celcius|°C|`22.11`|
|Temperature|`temperature`|celsius|°C|`22.11`|
|Humidity|`humidity`|percent|%|`55.42`|
|Air Pressure|`pressure`|hectopascals|hPa|`997.16`|
|Luminance|`luminance`|lux|lx|`35`|
Expand Down
14 changes: 7 additions & 7 deletions enviro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def stop_activity_led():
# read battery voltage - we have to toggle the wifi chip select
# pin to take the reading - this is probably not ideal but doesn't
# seem to cause issues. there is no obvious way to shut down the
# wifi for a while properly to do this (wlan.disonnect() and
# wifi for a while properly to do this (wlan.disconnect() and
# wlan.active(False) both seem to mess things up big style..)
old_state = Pin(WIFI_CS_PIN).value()
Pin(WIFI_CS_PIN, Pin.OUT, value=True)
Expand All @@ -128,7 +128,7 @@ def stop_activity_led():
# BUG This should only be set up for Enviro Camera
# external_trigger_pin = Pin(EXTERNAL_INTERRUPT_PIN, Pin.IN, Pin.PULL_DOWN)

# intialise the pcf85063a real time clock chip
# initialise the pcf85063a real time clock chip
rtc = PCF85063A(i2c)
i2c.writeto_mem(0x51, 0x00, b'\x00') # ensure rtc is running (this should be default?)
rtc.enable_timer_interrupt(False)
Expand Down Expand Up @@ -186,7 +186,7 @@ def reconnect_wifi(ssid, password, country, hostname=None):
CYW43_LINK_UP: "Connect to wifi with an IP address",
CYW43_LINK_FAIL: "Connection failed",
CYW43_LINK_NONET: "No matching SSID found (could be out of range, or down)",
CYW43_LINK_BADAUTH: "Authenticatation failure",
CYW43_LINK_BADAUTH: "Authentication failure",
}

wlan = network.WLAN(network.STA_IF)
Expand Down Expand Up @@ -305,7 +305,7 @@ def is_clock_set():
if seconds_since_sync < (config.resync_frequency * 60 * 60):
return True

logging.info(f" - rtc has not been synched for {config.resync_frequency} hour(s)")
logging.info(f" - rtc has not been synced for {config.resync_frequency} hour(s)")
except AttributeError:
return True

Expand Down Expand Up @@ -336,7 +336,7 @@ def sync_clock_from_ntp():
os.remove("sync_time.txt")
return False

logging.info(" - rtc synched")
logging.info(" - rtc synced")

# write out the sync time log
with open("sync_time.txt", "w") as syncfile:
Expand Down Expand Up @@ -417,9 +417,9 @@ def get_sensor_readings():

return readings

# save the provided readings into a todays readings data file
# save the provided readings into a today's readings data file
def save_reading(readings):
# open todays reading file and save readings
# open today's reading file and save readings
helpers.mkdir_safe("readings")
readings_filename = f"readings/{helpers.date_string()}.csv"
new_file = not helpers.file_exists(readings_filename)
Expand Down
6 changes: 3 additions & 3 deletions enviro/boards/urban.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
PM1_UGM3 = 2
PM2_5_UGM3 = 3
PM10_UGM3 = 4
PM1_UGM3_ATHMOSPHERIC = 5
PM2_5_UGM3_ATHMOSPHERIC = 6
PM10_UGM3_ATHMOSPHERIC = 7
PM1_UGM3_ATMOSPHERIC = 5
PM2_5_UGM3_ATMOSPHERIC = 6
PM10_UGM3_ATMOSPHERIC = 7
PM0_3_PER_LITRE = 8
PM0_5_PER_LITRE = 9
PM1_PER_LITRE = 10
Expand Down
2 changes: 1 addition & 1 deletion enviro/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@
UPLOAD_SKIP_FILE = 4

# humidity
WATER_VAPOR_SPECIFIC_GAS_CONSTANT = 461.5
WATER_VAPOUR_SPECIFIC_GAS_CONSTANT = 461.5
CRITICAL_WATER_TEMPERATURE = 647.096
CRITICAL_WATER_PRESSURE = 22064000
2 changes: 1 addition & 1 deletion enviro/destinations/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def upload_reading(reading):
mqtt_client.disconnect()
return UPLOAD_SUCCESS

# Try disconneting to see if it prevents hangs on this typew of errors recevied so far
# Try disconnecting to see if it prevents hangs on this type of errors received so far
except (OSError, IndexError) as exc:
try:
import sys, io
Expand Down
20 changes: 10 additions & 10 deletions enviro/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,26 +63,26 @@ def copy_file(source, target):

# https://www.calctool.org/atmospheric-thermodynamics/absolute-humidity#what-is-and-how-to-calculate-absolute-humidity
def relative_to_absolute_humidity(relative_humidity, temperature_in_c):
temperature_in_k = celcius_to_kelvin(temperature_in_c)
actual_vapor_pressure = get_actual_vapor_pressure(relative_humidity, temperature_in_k)
temperature_in_k = celsius_to_kelvin(temperature_in_c)
actual_vapour_pressure = get_actual_vapour_pressure(relative_humidity, temperature_in_k)

return actual_vapor_pressure / (WATER_VAPOR_SPECIFIC_GAS_CONSTANT * temperature_in_k)
return actual_vapour_pressure / (WATER_VAPOUR_SPECIFIC_GAS_CONSTANT * temperature_in_k)

def absolute_to_relative_humidity(absolute_humidity, temperature_in_c):
temperature_in_k = celcius_to_kelvin(temperature_in_c)
saturation_vapor_pressure = get_saturation_vapor_pressure(temperature_in_k)
temperature_in_k = celsius_to_kelvin(temperature_in_c)
saturation_vapour_pressure = get_saturation_vapour_pressure(temperature_in_k)

return (WATER_VAPOR_SPECIFIC_GAS_CONSTANT * temperature_in_k * absolute_humidity) / saturation_vapor_pressure * 100
return (WATER_VAPOUR_SPECIFIC_GAS_CONSTANT * temperature_in_k * absolute_humidity) / saturation_vapour_pressure * 100

def celcius_to_kelvin(temperature_in_c):
def celsius_to_kelvin(temperature_in_c):
return temperature_in_c + 273.15

# https://www.calctool.org/atmospheric-thermodynamics/absolute-humidity#actual-vapor-pressure
# http://cires1.colorado.edu/~voemel/vp.html
def get_actual_vapor_pressure(relative_humidity, temperature_in_k):
return get_saturation_vapor_pressure(temperature_in_k) * (relative_humidity / 100)
def get_actual_vapour_pressure(relative_humidity, temperature_in_k):
return get_saturation_vapour_pressure(temperature_in_k) * (relative_humidity / 100)

def get_saturation_vapor_pressure(temperature_in_k):
def get_saturation_vapour_pressure(temperature_in_k):
v = 1 - (temperature_in_k / CRITICAL_WATER_TEMPERATURE)

# empirical constants
Expand Down
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# from phew import logging
# logging.disable_logging_types(logging.LOG_DEBUG)

# Issue #117 where neeed to sleep on startup otherwis emight not boot
# Issue #117 where need to sleep on startup otherwise might not boot
from time import sleep
sleep(0.5)

Expand All @@ -45,7 +45,7 @@

# check disk space...
if enviro.low_disk_space():
# less than 10% of diskspace left, this probably means cached results
# less than 10% of disk space left, this probably means cached results
# are not getting uploaded so warn the user and halt with an error

# Issue #126 to try and upload if disk space is low
Expand Down