Advise on the most elegant way to store google calendar events on Arduino

Hi all–

I am working on a project which consists on programming Arduino to activate a set of relays according to google calendar. I need some advise on the best strategy to store the google calendar information (i.e. the times at which those relays need to be activated). What is the best option:

  • Store relays time in an array? Can this array be dynamic according to the number of calendar events?
  • Store this information in the EEPROM and modify it every time there is an update in google calendar?
  • Any other suggestion or example on the most elegant way to do it?

Thanks!
Raimon

I'd go with EEPROM. Only have 1024 bytes in '328P, so minimize the data across say 4 bytes: YM DD HR MM to turn on, YM DD HR MM to turn off
Y year, 13-14-15 as 0xOD, OE, OF
M Month 1-12 as 0x01 to 0x0C
DD day 1-31 0x01 to 0x1F (whatever 31 is)
HR hour 0 to 23 0x00 to 0x17
MM minute 0 to 59 0x00 to 0x3B

so 8 bytes, 128 events

Google Calendar has an API with which you can list upcoming events.

I wouldn't see it as ideal to attempt to store upcoming events, rather just poll your calendar every hour or so and store the time of the next event.