My entry for the Internet of Holiday Lights is an electro-mechanical wreath.
My first blog post was a brain dump of possibilities.
In my second post I made a paper prototype.
My third post was about getting the Arduino Yun up and running.
This time I'm making the Atmel and Linux part work together to get current date information.
Because I'm changing the state of my gizmo based on the advent calendar, I need to know current date info.
Getting the right time from Linux
I've prepped my Arduino Yun to reflect the right date based on my timezone (Belgium).
Then I refreshed my knowledge of the Linux date command.
I need the following parameters to get the data I need for my design:
%d day of month (e.g, 01) %H hour (00..23) %m month (01..12) %M minute (00..59) %u day of week (1..7); 1 is Monday %Y year
Command that I'll submit in Linux: date +%Y%m%d%u%H%M
Result: 2014122212306
I used the Arduino.cc Time Check example as a starting point to get all info into the sketch.
That wasn't too difficult. Here's the result: