10 digit random number generator work with uin8_t

Ashley2708:
I have taken out the random() function

I really thought your question was about that exact part after reading OP.

Anyway, do take a look at itoa.