Hi folks I'm looking if there is a function tha let me convertes variables from binary to decimal values... for example:
byte booleanArray[8] = {0,0,0,0,0,0,0,0}
int decimalValue = 0;
booleanArray = {1,0,1,0,1,0,1,0}; We know that "10101010" en Binary System is "170" in Decimal System...
So I want to know how I can do this converstion!:D...
Where are these binary arrays coming from? This isn't a natural way to represent a number, and perhaps it would be possible to get your data into a format that avoids the need for this explicit conversion.
void setup() {
 // put your setup code here, to run once:
 Serial.begin(115200);
 byte booleanArray[8] = {1, 0, 1, 0, 1, 0, 1, 0};
 byte decimalValue = 0;
 int j, temp;
 for (int i = sizeof(booleanArray) / sizeof(booleanArray[0]) - 1, j = 0; i > -1; i--) {
  decimalValue += booleanArray[j++] << i;
 }
 Serial.print(decimalValue);
}
void loop() {
 // put your main code here, to run repeatedly:
However, I agree with PeterH, this seems a weird way to do something, unless it's a homework assignment.