ThomasKearney / weather_clock

1 stars 1 forks source link

Moon/Sun images based on sunrise/sunset times #2

Open ajbowler opened 8 years ago

ajbowler commented 8 years ago
{
  "response": {
  "version":"0.1",
  "termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
  "features": {
  "astronomy": 1
  }
    }
        ,   "moon_phase": {
        "percentIlluminated":"62",
        "ageOfMoon":"21",
        "phaseofMoon":"Waning Gibbous",
        "hemisphere":"South",
        "current_time": {
        "hour":"12",
        "minute":"52"
        },
        "sunrise": {
        "hour":"6",
        "minute":"23"
        },
        "sunset": {
        "hour":"17",
        "minute":"31"
        },
        "moonrise": {
        "hour":"23",
        "minute":"53"
        },
        "moonset": {
        "hour":"10",
        "minute":"09"
        }
    },
    "sun_phase": {
        "sunrise": {
        "hour":"6",
        "minute":"23"
        },
        "sunset": {
        "hour":"17",
        "minute":"31"
        }
    }
}

Example when using Wunderground's astronomy feature.

I can do the code but suck at pixel art if you ever wanna add something like this.

It's 10pm and I'm seeing a goddamn sun, m8 :sun_with_face:

ajbowler commented 7 years ago

There could be images for each phase of the moon if you wanna get real fancy. Full, waning, etc. the API directly provides it.

ThomasKearney commented 7 years ago

My SD that was running this got corrupted :( Not sure if it's a hardware issue or not. While I'm figuring that out though I could create some more images and push them up.

ajbowler commented 7 years ago

:+1: I can add some code for getting the moon data. This is also as good a time as any to organize the existing code a bit better.