convert char into int

Chars are integers; just stored as a different data type. Each character has their own value, you can look up the ASCII table to get the exact values. But because we know they are essentially integers, we can subtract 0 as a char from the value you're getting to get the integer. So let's say you have your buffer and you want to convert it to integers. Well...

int integerBuffer[7];
for (int i = 0; i < 7; i ++){
    integerBuffer[i] = buffer[i] - '0';
}

Hope that helps.