I am using 1.8.19 compiler for a uno and a beginner with C++!!
The following code compiles with an error at " TestData[6]" and onwards
" TestData[5]" line compiles ok.
The snippet compiles ok with a normal C++ compiler.
The error is "warning: overflow in implicit constant conversion [-Woverflow]
void setup() {
// put your setup code here, to run once:
}
const int ControlDataMaxLen = 50;
int ControlData[51];
int ControlDataLen = 50;
int TestData[50];
int TestDataLen = 0;
void loop()
{
TestData[0] = 12;
TestData[1] = 30;
TestData[2] = 20;
TestData[3] = 0;
TestData[4] = 0;
TestData[5] = 0b0000000000000000000000010000001;
TestData[6] = 0b0000000001000000000000000100010;
TestData[7] = 0b0000000001000000000000010000001;
TestData[8] = 0b0000000001000000000000000100101;
TestData[9] = 0b0000000001000000000000010000001;
TestData[10]= 0b0000000001000000000000010001010;
TestData[11] = 0b0000000001000000000100100100010;
TestData[12] = 0b0000000000000000000000000000000;
}