Pin node to connect with any as7265x device (as72651, as72652 or as72653).
To use the node in your project you should have the antoniorruiz/led-triad library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.
C++ implementation
#pragma XOD require "https://github.com/sparkfun/SparkFun_AS7265x_Arduino_Library"
#include "SparkFun_AS7265X.h"
node {
meta {
// Define our custom type as a pointer on the class instance.
using Type = AS7265X*;
}
// Create an object of class Adafruit_TSL2591
AS7265X sensor = AS7265X();
// Internal state variables defined at this level persists across evaluations
Number foo;
uint8_t bar = 5;
void evaluate(Context ctx) {
bar += 42;
if (isSettingUp()) {
// This run once
foo = (Number)(bar + 1);
}
sensor.begin();
emitValue<output_OUT>(ctx, &sensor);
}
}