Arduino Planetary Hours library
I am finally announcing my PlanetaryHours library for the Arduino. This library uses the
sun_set() functions from the avr-libc time.h library to calculate planetary hours.
Planetary hours are an old method of figuring out which planets are “in charge” at any moment. For more information on planetary hours, check out these resources:
You can set up a
PlanetaryHour object by passing it a time zone offset in hours, a latitude, and a longitude. The following example might help.
#define MYZONE -7 PlanetaryHour ph(MYZONE, 45.5, -122.7);
Then, you can check the ruling planet of the current day and hour with an RTC or other time-keeping mechanism.
time_t timer = utc.unixtime() - UNIX_OFFSET; uint8_t dayPlanet = ph.dayPlanet(&timer); uint8_t hourPlanet = ph.hourPlanet(&timer);
The return value of
hourPlanet() is a number from 0 to 6, corresponding to the Chaldean planetary order.
#define SATURN 0 #define JUPITER 1 #define MARS 2 #define SUN 3 #define VENUS 4 #define MERCURY 5 #define MOON 6
I’ll be posting an article on the Arnemancy blog outlining a project I just installed using this library and some NeoPixels. I really look forward to seeing what others end up doing with this code!