For the serial communications part here is a really good tutorial:
I can't help with the Firebase part, sorry.