Hi. It looks like the chart dashboard option is only good for numbers. Is there are a way to plot history of Boolean variables?
On most systems, a bool is nothing more than a byte with the values 0 and 1. So if you send something, you will send a 0 or a 1. And those are numbers ![]()
Note: No knowledge whatsoever of IoT Cloud related stuff.
int mynum = mybool ? 1 : 0;
Maybe you can plot the bits, 0s (false) and 1s (true), to a string or somekind of array?
Is this like Serial Plotter?
If the range 0 to 1 is too small to chart, you could multiply by a constant:
Serial.print(myBoolean * 200);
Thanks for the replies! Sorry, I should have made clear my question is specific to IoT Cloud, which is why I posted in this spot.
In IoT cloud, there is a Chart widget for the dashboard, but it appears to only allow selection of variables of type int or float. Yep, as suggested, I can create an additional variable in my sketch and convert boolean to int and chart that, but I guess I was wondering if there was already a chart option for booleans that I'd missed.
The IoT developers could add bool with ease, but don’t hold your hopes
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.