I have no problem writing the value to the feed, but what I haven't figured out is how to read the latest value from the same feed, store that in a variable so I can use that to re-establish the baseline after a reset.
something like:
Code: Select all
AdafruitIO_Feed *baseline1Feed = io.feed("sgp30.baseline1");
AdafruitIO_Feed *baseline2Feed = io.feed("sgp30.baseline2");
void setup() {
baseline1 = baseline1Feed->get;
baseline2 = baseline2Feed->get;
setupSGP30(baseline1,baseline2);
// where this is a modified version from SGP30test.h to take two variables and set the baselines on setup
****Baseline values: eCO2: 0x8BE4 & TVOC: 0x8DCC
received <- 35814
received <- 35812