I think you mean:
if (tecla == 'b') // You had '='. I think you meant '=='
{
a = 1; // You had this line between the 'if' and the bracket. I think you want it inside the bracket.
digitalWrite(ledb, 0);
}
else
a = 0;