Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

otDustSensor Class Reference
[Optical Dust SensorOptical Dust Sensor]

Optical Dust Sensor.

#include <otDustSensor.h>


Public Types

enum  Type { GP2Y1010AU0F }
 < Sensor types More...

Public Member Functions

 otDustSensor ()
void init (U8 sensor, U8 ledBit, U8 timer, U8 adcChan, otPga *pga, otADS868x *adc)
F32 measure (U32 samples)
F32 measure ()


Member Enumeration Documentation

enum otDustSensor::Type
 

Enumeration values:
GP2Y1010AU0F  SHARP sensor.


Constructor & Destructor Documentation

otDustSensor.otDustSensor  ) 
 

Create the class


Member Function Documentation

void otDustSensor.init U8  sensor,
U8  ledBit,
U8  timer,
U8  adcChan,
otPga pga,
otADS868x adc
 

Init the library

Parameters:
sensor Dust sensor type, see Type
ledBit Bit use don PX port to trun ON/OFF measurement LED
timer Timer identifier used for time measure
adcChan ADC channel used for sample
pga otPga class pointer
adc otADS868x class pointer

F32 otDustSensor.measure  ) 
 

Perform a measure

Returns:
Measure of dust as ug/m3

F32 otDustSensor.measure U32  samples  ) 
 

Perform an average measure. A measure require 10ms

Parameters:
samples Number of samples to average
Returns:
Measure of dust as ug/m3


The documentation for this class was generated from the following file: footer
otStudio - Library Reference - (C) 2020-23 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0