in_ccs811_hdc1080.h
Go to the documentation of this file.
#pragma once
#ifndef CSSHDC_DISABLE
#include <inputs.h>
#include <abstractin.h>
#include <Wire.h>
#include "ClosedCube_HDC1080.h"
#include "SparkFunCCS811.h" //Click here to get the library: http://librarymanager/All#SparkFun_CCS811
//#define CCS811_ADDR 0x5B //Default I2C Address
#define CCS811_ADDR 0x5A //Alternate I2C Address
#if defined (ARDUINO_ARCH_ESP8266)
#define twi_scl D1
#ifndef WAK_PIN
#define WAK_PIN D3
#endif
#define SCL_LOW() (GPES = (1 << twi_scl))
#define SCL_HIGH() (GPEC = (1 << twi_scl))
#define SCL_RESET
#endif
/*
#if defined (__SAM3X8E__)
#define SCL_LOW() digitalWrite(21,LOW)
#define SCL_HIGH() digitalWrite(21,HIGH)
#define SCL_RESET
#endif
*/
#if defined (ARDUINO_ARCH_ESP32)
#undef WAK_PIN
#undef SCL_RESET
//#ifndef WAK_PIN
//#define WAK_PIN 17
//#endif
#endif
#if defined(ARDUINO_ARCH_AVR)
#ifndef WAK_PIN
#define WAK_PIN 3 // for LightHub UEXT SCS Pin
#endif
#endif
class Input;
class in_ccs811 : public abstractIn {
public:
//CCS811 ccs811(CCS811_ADDR);
//uint16_t ccs811Baseline;
in_ccs811(Input * _in):abstractIn(_in){};
int Setup() override;
int Poll(short cause) override;
protected:
void printDriverError( CCS811Core::status errorCode );
void printSensorError();
};
class in_hdc1080 : public abstractIn {
public:
//ClosedCube_HDC1080 hdc1080;
in_hdc1080(Input * _in):abstractIn(_in){};
int Setup() override;
int Poll(short cause) override;
protected:
void printSerialNumber();
};
#endif
in_hdc1080::in_hdc1080
in_hdc1080(Input *_in)
Definition: in_ccs811_hdc1080.h:64
in_hdc1080::printSerialNumber
void printSerialNumber()
Definition: in_ccs811_hdc1080.cpp:194
in_hdc1080::Setup
int Setup() override
Definition: in_ccs811_hdc1080.cpp:61
in_ccs811::printSensorError
void printSensorError()
Definition: in_ccs811_hdc1080.cpp:233
abstractin.h
in_ccs811::Setup
int Setup() override
Definition: in_ccs811_hdc1080.cpp:22
in_ccs811
Definition: in_ccs811_hdc1080.h:48
in_hdc1080::Poll
int Poll(short cause) override
Definition: in_ccs811_hdc1080.cpp:88
Input
Definition: inputs.h:132
inputs.h
in_ccs811::printDriverError
void printDriverError(CCS811Core::status errorCode)
Definition: in_ccs811_hdc1080.cpp:207
in_ccs811::Poll
int Poll(short cause) override
Definition: in_ccs811_hdc1080.cpp:134
in_ccs811::in_ccs811
in_ccs811(Input *_in)
Definition: in_ccs811_hdc1080.h:52
abstractIn
Definition: abstractin.h:6
in_hdc1080
Definition: in_ccs811_hdc1080.h:61