Loom 4 v4.5
Arduino library for Internet of Things Rapid Prototyping in environmental sensing
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
Loom_K30 Class Reference

#include <Loom_K30.h>

Inheritance diagram for Loom_K30:
Inheritance graph
[legend]
Collaboration diagram for Loom_K30:
Collaboration graph
[legend]

Public Member Functions

 Loom_K30 (Manager &man, bool useMux=false, int addr=0x68, bool warmUp=true, int valMult=1)
 
int getCO2 ()
 
- Public Member Functions inherited from I2CDevice
 I2CDevice (const char *modName)
 
bool checkDeviceConnection ()
 
- Public Member Functions inherited from Module
 Module (const char *modName)
 
void setModuleName (const char *modName)
 
virtual const char * getModuleName ()
 
virtual void printModuleName (const char *message)
 
virtual void initialize ()=0
 
virtual void measure ()=0
 
virtual void package ()=0
 
virtual void power_up ()=0
 
virtual void power_down ()=0
 
virtual void display_data ()
 

Protected Member Functions

void power_up () override
 
void power_down () override
 
void measure () override
 
void initialize () override
 
void package () override
 

Additional Inherited Members

- Public Attributes inherited from I2CDevice
bool needsReinit = false
 
- Public Attributes inherited from Module
bool moduleInitialized = true
 
int module_address = -1
 

Detailed Description

Handles communication with the K30 sensor

Product Page: https://www.co2meter.com/products/k-30-co2-sensor-module?variant=8463942

Author
Will Richards

Constructor & Destructor Documentation

◆ Loom_K30()

Loom_K30::Loom_K30 ( Manager man,
bool  useMux = false,
int  addr = 0x68,
bool  warmUp = true,
int  valMult = 1 
)

Construct a new K30 sensor using I2C to communicate

Parameters
manReference to the manager
useMuxIf this module will be using the mux
addrI2C address
warmUpIf we should wait 6 minutes before collecting data to allow the sensor to warm up
valMultHow much to multiply the recorded output by

Member Function Documentation

◆ getCO2()

int Loom_K30::getCO2 ( )
inline

Get the current CO2 levels collected by the sensor

◆ initialize()

void Loom_K30::initialize ( )
overrideprotectedvirtual

Implements Module.

◆ measure()

void Loom_K30::measure ( )
overrideprotectedvirtual

Implements Module.

◆ package()

void Loom_K30::package ( )
overrideprotectedvirtual

Implements Module.

◆ power_down()

void Loom_K30::power_down ( )
inlineoverrideprotectedvirtual

Implements Module.

◆ power_up()

void Loom_K30::power_up ( )
inlineoverrideprotectedvirtual

Implements Module.


The documentation for this class was generated from the following files: