Loom 4 v4.5
Arduino library for Internet of Things Rapid Prototyping in environmental sensing
Loading...
Searching...
No Matches
Loom_AS7262.h
1#pragma once
2
3#include <AS726X.h>
4#include <Wire.h>
5
6#include "../I2CDevice.h"
7#include "Loom_Manager.h"
8
14class Loom_AS7262 : public I2CDevice{
15 protected:
16 void power_down() override {};
17
18
19 // Manager controlled functions
20 void measure() override;
21 void initialize() override;
22 void package() override;
23 void power_up() override;
24
25 public:
36 Manager& man,
37 bool useMux = false,
38 int addr = 0x49,
39 uint8_t gain = 1,
40 uint8_t mode = 3,
41 uint8_t integration_time = 50
42 );
43 private:
44 Manager* manInst; // Instance of the manager
45 AS726X asInst; // Instance of the AS7262
46
47 uint16_t color[6]; // Measured color bands values. Units: counts / (μW/cm^2)
48
49 uint8_t gain; // Gain setting
50 uint8_t mode; // Sensor mode
51 uint8_t integration_time; // Integration time setting
52};
Definition: I2CDevice.h:6
Definition: Loom_AS7262.h:14
Definition: Loom_Manager.h:18