Debinix Team Library SensorWLED
Provides methods to retrieve instant and peak values from the ADC input.
Classes | Macros | Enumerations
SensorWLED.h File Reference
#include <cmath>
#include <cstdint>
#include <plog/Appenders/ConsoleAppender.h>
#include <plog/Formatters/TxtFormatter.h>
#include <plog/Init.h>
#include <plog/Log.h>

Go to the source code of this file.

Classes

struct  VersionType_t
 Unique EEPROM Id and code version. More...
 
struct  CalibrationDataType_t
 ADC pin and ADC channel calibration data. More...
 
struct  DynamicDataType_t
 Various static, instant and dynamic (peak) data. More...
 
class  SensorWLED
 Track instant and peak DC ADC input readings. More...
 

Macros

#define EEPROM_IDSTART   0xA0
 Single EEPROM area: Id and Version. More...
 
#define MAXINSTANCES   10
 Max number of instantiated EEPROM areas.
 
#define EEPROM_ID   0xA5
 EEPROM id marker (never touch) More...
 
#define VERSION_MAJOR   0
 Semantic versioning (M.m.p)
 
#define VERSION_MINOR   1
 Semantic versioning (M.m.p)
 
#define VERSION_PATCH   0
 Semantic versioning (M.m.p)
 
#define CRC32_TABLE_SIZE   256
 The size of table. More...
 
#define US_ADC_CONVERSION_TIME   250
 

Enumerations

enum  AdcResolutionType_e : uint16_t { bits10 = 1023 , bits12 = 4095 , bits13 = 8191 , bits16 = 65535 }
 
enum  VoltageVccType_e : uint16_t { mv_vcc_3v3 = 3300 , mv_vcc_5v = 5000 }
 
enum  DecayModelType_e : uint16_t { linear_decay , exponential_decay }
 

Detailed Description

This is part of SensorWLED library for the Arduino platform. Source: https://github.com/berrak/SensorWLED

The MIT license.

Macro Definition Documentation

◆ EEPROM_IDSTART

#define EEPROM_IDSTART   0xA0

Single EEPROM area: Id and Version.

Microcontroller EEPROM memory locations

◆ EEPROM_ID

#define EEPROM_ID   0xA5

EEPROM id marker (never touch)

Members in the Version struct

◆ CRC32_TABLE_SIZE

#define CRC32_TABLE_SIZE   256

The size of table.

The size of the table used for CRC32 calculations

◆ US_ADC_CONVERSION_TIME

#define US_ADC_CONVERSION_TIME   250

Used ADC conversion time, in microseconds to (optionally) smooth readings

Enumeration Type Documentation

◆ AdcResolutionType_e

enum AdcResolutionType_e : uint16_t

Sets the microcontroller ADC resolution in bits

Enumerator
bits10 

ADC max resolution is 10 bits.

bits12 

ADC max resolution is 12 bits.

bits13 

ADC max resolution is 13 bits.

bits16 

ADC max resolution is 16 bits.

◆ VoltageVccType_e

enum VoltageVccType_e : uint16_t

Microcontroller supply voltage VCC (millivolts)

Enumerator
mv_vcc_3v3 

Microcontroller VCC: 3V3.

mv_vcc_5v 

Microcontroller VCC: 5V.

◆ DecayModelType_e

enum DecayModelType_e : uint16_t

Decay models for the peak value methods

Enumerator
linear_decay 

Peak value decay - linear.

exponential_decay 

Peak value decay - exponentially.