Hello
I have a char array containing a binary string and I want to convert it to a integer, this is what I have:
int noOut = 0;
char binIn[9] = "00001010";
for (int ii =0; ii < 8; ii++) {
noOut = noOut | int(binIn[ii]) << ii;
}
Serial.println(noOut);
this gives 8176 as the output, it is wrong.
Can anyone help
Thanks
Karl.