I have got a String filled up with 0 and 1 and would like to get an Integer out of it: (platform in an Arduino UNO)
String bitString = "";
int Number;
int tmp;
bitString = "";
for (i=1;i<=10;i++)
{
tmp= analogRead (A0);
bitString += tmp % 2;
delay(50);
}
// now bitString contains for example "10100110"
// Number = bitstring to int <-------------
// In the end I want that the variable Number contains the integer 166