Our fire detector go rotten for no motivation, what could be the problem? It beeped a couple of times, stopping once surrounded by a...

It beeped a couple of times, stopping once surrounded by a while.
It's battery operate, so could the battery newly be going?
I tapped it and it stopped.
It wasn't connected to our ceiling any, it was on a small table and it's on the second floor of our home, the one down stairs wasn't going sour.
It's a very hot light of day today, could it be from the heat?
It's only a fire detector, not carbon dioxide. And no, our house isn't on fire.
Thanks surrounded by advance.
Answers:    It could any be from the heat (OURS go off yesterday morning due to the 90+ point heat and not have our A/C unit hooked up all the same.) or...it could be that that particular detector is within need of a unmarked battery (as they'll sometimes chirp, or shift off when they have need of a fresh 9V)
That is the low battery power indicator that freshly beeps a few times. Change both battery in the section, it may beep a couple more times to sense the latest voltage level. Good luck.