Closed mgerst closed 5 years ago
Do you think the backend should calculate the battery percentage, or the arduino?
Also about seeing battery over time, (as a separate task) we could use something like DarkSky to get the weather, and associate how sunny it is.
The battery level is given as a percentage from the FONA, so no calculation needed.
I like the weather idea.
Oh ok, I was under a different impression.
Yeah, I was happily surprised when I found that out. Made things a lot easier. Although, now that I think about it, I'm not sure how it can know what the percentage is. I'll look into that, we may have to tell it what size the battery is to make it accurate.
Maybe the FONA is able to get the max charge (not sure if that's the right wording) from the battery?
I made this issue for the weather #61.
What format do you get the battery in? I assume it's not a string that can says 100%
, but is it a decimal number 0-100, or a decimal 0-1, or something else?
You know, that's a great question. I'm treating it as a double, but reading it as a uint16
. Either way it's 0-100.
Ok, looked at what is actually being sent. It's an integer from 0-100.
Either in the location endpoint or another endpoint, we should take in the current battery level of the gnome. This will help with debugging and it might be cool to see the battery over time.