Skip to content

Commit

Permalink
addresses #47
Browse files Browse the repository at this point in the history
  • Loading branch information
brentru committed Mar 3, 2023
1 parent 2af7609 commit a902f89
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
3 changes: 3 additions & 0 deletions Adafruit_Sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ void Adafruit_Sensor::printSensorDetails(void) {
case SENSOR_TYPE_PM100_ENV:
Serial.print(F("Environmental Particulate Matter 100 (ppm)"));
break;
case SENSOR_TYPE_GAS_RESISTANCE:
Serial.print(F("Gas Resistance (ohms)"));
break;
}

Serial.println();
Expand Down
7 changes: 5 additions & 2 deletions Adafruit_Sensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ typedef enum {
SENSOR_TYPE_PM100_STD = (25),
SENSOR_TYPE_PM10_ENV = (26),
SENSOR_TYPE_PM25_ENV = (27),
SENSOR_TYPE_PM100_ENV = (28)
SENSOR_TYPE_PM100_ENV = (28),
SENSOR_TYPE_GAS_RESISTANCE = (29),
} sensors_type_t;

/** struct sensors_vec_s is used to return a vector in a common format. */
Expand Down Expand Up @@ -163,8 +164,10 @@ typedef struct {
million (ppm) */
float pm25_env; /**< Environmental Particulate Matter 2.5 in parts per
million (ppm) */
float pm100_env; /**< EnvironmentalParticulate Matter 100 in parts per
float pm100_env; /**< Environmental Particulate Matter 100 in parts per
million (ppm) */
float gas_resistance; /**< Proportional to the amount of VOC particles in
the air (Ohms) */
sensors_color_t color; /**< color in RGB component values */
}; ///< Union for the wide ranges of data we can carry
} sensors_event_t;
Expand Down
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ typedef enum
SENSOR_TYPE_PM100_STD = (25),
SENSOR_TYPE_PM10_ENV = (26),
SENSOR_TYPE_PM25_ENV = (27),
SENSOR_TYPE_PM100_ENV = (28)
SENSOR_TYPE_PM100_ENV = (28),
SENSOR_TYPE_GAS_RESISTANCE = (29)
} sensors_type_t;
```

Expand Down Expand Up @@ -159,6 +160,7 @@ typedef struct
float pm10_env,
float pm25_env,
float pm100_env,
float gas_resistance,
sensors_color_t color;
};
} sensors_event_t;
Expand Down Expand Up @@ -204,14 +206,15 @@ A key part of the abstraction layer is the standardisation of values on SI units
- **tvoc**: values are in **parts per billion** (ppb)
- **voc_index**: values are an **index** from 1-500 with 100 being normal
- **nox_index**: values are an **index** from 1-500 with 100 being normal
- **CO2**: values are in **parts per million*** (ppm)
- **eCO2**: values are in **parts per million*** (ppm)
- **pm10_std**: values are in **parts per million*** (ppm)
- **pm25_std**: values are in **parts per million*** (ppm)
- **pm100_std**: values are in **parts per million*** (ppm)
- **pm10_env**: values are in **parts per million*** (ppm)
- **pm25_env**: values are in **parts per million*** (ppm)
- **pm100_env**: values are in **parts per million*** (ppm)
- **CO2**: values are in **parts per million** (ppm)
- **eCO2**: values are in **parts per million** (ppm)
- **pm10_std**: values are in **parts per million** (ppm)
- **pm25_std**: values are in **parts per million** (ppm)
- **pm100_std**: values are in **parts per million** (ppm)
- **pm10_env**: values are in **parts per million** (ppm)
- **pm25_env**: values are in **parts per million** (ppm)
- **pm100_env**: values are in **parts per million** (ppm)
- **gas_resistance**: values are in **ohms**

## The Unified Driver Abstraction Layer in Practice ##

Expand Down

0 comments on commit a902f89

Please sign in to comment.