The Potentiometer and buttons follow the following structure;
struct Button {
int previousVal = 0;
int currentVal = 0;
int pin;
String label;
Button() {}
...
}
The following are the labels for the Potentiometers; ( X, Y, Z, A, B, C )
String pontMeterLabels[NUM_OF_POTMETERS] = {"X", "Y", "Z", "A", "B", "C"};
Whenever one of the analogRead() value of any button changes, the serial send out a string of all the data, in the format of label:value{X:27},{Y:0},{Z:0},{A:0},{B:60},{C:84}
With this approach, we will have more data per query
The other approach will be only sending the data that changed..
The Potentiometer and buttons follow the following structure;
The following are the labels for the Potentiometers; ( X, Y, Z, A, B, C )
String pontMeterLabels[NUM_OF_POTMETERS] = {"X", "Y", "Z", "A", "B", "C"};
Whenever one of the analogRead() value of any button changes, the serial send out a string of all the data, in the format of label:value
{X:27},{Y:0},{Z:0},{A:0},{B:60},{C:84}
The other approach will be only sending the data that changed..
let me know what will you prefer