Adding features to a simple clock sketch
hello,
i have decided build simple clock school project. specifically, plan build lite brite clock. if haven't seen it can seen here; http://www.instructables.com/id/lite-brite-led-clock/ so, can see, user has made nice write of construction, upon further inspection see there no way set time other reprograming arduino.
so, question is, me add code set time 2 momentary switches or similar?
below attached "wiring diagram"
the author says change time using line of code 6 lines down says "settime" have rest of code, assume need.
if you've got more questions let me know. , help
i have decided build simple clock school project. specifically, plan build lite brite clock. if haven't seen it can seen here; http://www.instructables.com/id/lite-brite-led-clock/ so, can see, user has made nice write of construction, upon further inspection see there no way set time other reprograming arduino.
so, question is, me add code set time 2 momentary switches or similar?
below attached "wiring diagram"
the author says change time using line of code 6 lines down says "settime" have rest of code, assume need.
if you've got more questions let me know. , help
code: [select]
#include <time.h>
int column[]={0,1,2,3,4,5,6,7,8,9,10,11};
int row[] = {14,15,16,17,18};
void setup()
{
settime(9,27,0,27,7,2012);
quote
so, question is, me add code set time 2 momentary switches or similar?
you need more two. need 2 move left or right through series of values - month, day, year, hour, minute, , second - , 2 increment or decrement value of appropriate variable. plus, need 1 trigger "set time" action , 1 trigger "now, set time" action. that's 6 count. in addition, you'd need way of knowing value (month, day. etc.) being modified, , way of knowing new value be.
Arduino Forum > Using Arduino > Programming Questions > Adding features to a simple clock sketch
arduino
Comments
Post a Comment