Serial.print show garbage when used several times

The bin array goes out of scope at the moment that you leave the function so you return a pointer to nothing.

You should also not mix return types; false is a bool and the function is supposed to return a pointer to char; rather return NULL. And you will have to check that return value before using it. But this is a bit moot because of bin going out of scope; different approach needed :wink: