I'm abusing the excellent b/w weather station as a display for my own home automation system. I collect data from sensors, send them via MQTT to the broker for further processing via node-red. All the data for the weather station is fetched from a MQTT topic (JSON format, retained). That way uptime between 10min sleep is less than 2 seconds. Currently I'm using it for temperatures around the house, rain water tank level, solar power, etc. So far so good.
I'd like to display the current moon phase. The node-red data offers two values (from a astronomy node). And no, I do not have a clue what they mean:
moonPhaseNumber: 0.028
moonAge: 19.421
These values are for Switzerland, Nov 16, 2020, 15:35
I found from looking at the code from Daniel that with the following command I might be able to display a nice Icon, if I select the correct font first.
gfx.drawString(x, y, String((char) (nn)));
But I have currently no clue how to map the values I have from my home automation system to a Icon number nn. What Icon numbers are valid? Do they start at 0 with full moon up to 255 with full moon again?
I need to map from moonPhaseNumber/moonAge (which I currently do not understand) to a Icon number nn, which I do not understand neither. The first part I do probably need to figure out myself. But the second part is something where people on this board might be able to help.
Many thanks for any hints,
Urs.