Pages: [1]   Go Down
Author Topic: Clock 2.0  (Read 1151 times)
0 Members and 1 Guest are viewing this topic.
Devon, UK
Offline Offline
Full Member
***
Karma: 4
Posts: 234
Arduino rocks my socks, yes the socks are rocking!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It is clock 2.0 because it is the second version I have made (well third if you include the alteration of the GLCD Clock demo, I don't)

It has time, date and an alarm (perhaps more in future) and settings can be accessed with a menu system.  Four buttons are used, Up, Down, OK and Back.

The code is in this .zip file, and I used AVR Project IDE, but the file extensions are standard.

Here is a video for your viewing pleasure too, sorry about the focus it is the only camera I have access to. smiley-sad
[media]http://www.youtube.com/watch?v=1ofdgq3o7sg[/media]

/me
« Last Edit: August 16, 2010, 03:39:07 pm by Gray_Malkin » Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 471
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great graymalkin!!

In fact i am involve in a similar project: I use a 128x64 GLCD and thenew beta version of the GLCD library.

At this moment i saw date, time, and alarms, but also sunset, sunrise, moonphase, temperature/humidity/pressure, day of the year, weeknumber, and in a nearest future: special days (newyear, christmas, and so on), and probably more things...

I am now working on the buttons and setting menus...

So nice to read about your project. It will provide a lot of ideas to me.
Thanks!
Logged

Devon, UK
Offline Offline
Full Member
***
Karma: 4
Posts: 234
Arduino rocks my socks, yes the socks are rocking!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, menus seem to work the best with a list then an arrow to the left.  Good idea with the moon phase and sunrise/sunset times. I can't add temp and humidity, ran out of IO smiley-sad
Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 471
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, this is also my pain.... i have some free pins thanks that i am working on use only one analog pin for all the buttons, by the use of this idea:
http://www.acorrias.it/?Arduino:Analog_keyboard

Then, two pins for SH15 provide temperature and humidity. And i am working on place in digital 0 and 1 pins the pressure sensor... but i am working on that.

The other options are based on code, so it is perfect because it does not consume pins...

Cheers!
Logged

Devon, UK
Offline Offline
Full Member
***
Karma: 4
Posts: 234
Arduino rocks my socks, yes the socks are rocking!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have considered using some i2c devices, eg an io exteneder and a ds1307 chip, and some other things like that as they only need two IO pins (SDA and SCK) even with multiple devices through addressing. Could get complex quickly though... It's only opposed to be an alarm clock... It took me long enough to add the game of life (compiler didn't like it, so I tricked it.. Then it gave weird error messages that didn't relate to the error)

Who knew that avr-Gcc could be quite so ambiguous?! Why say "left hand operand requires lvalue in increment or decrement" when what it really means is "don't reasign that constant integer that got put in sneakily by some library you're using" !!! it took me literally hours to figure out what was going on.

Also, anyone got a clue how to work out moon phase? I googles it and found an algorithm, but it didn't work and gave me silly results, add one to the day and it jumped back 3 phases (of smiley-cool...
Logged

Offline Offline
Sr. Member
****
Karma: 0
Posts: 471
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have the moonphase correctly working in my project. Give me a couple of days to post here the code of this function, please (i dont´ahve it in this computer...)

Cheers,
Logged

Devon, UK
Offline Offline
Full Member
***
Karma: 4
Posts: 234
Arduino rocks my socks, yes the socks are rocking!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Awsome, thanks.
Logged

Pages: [1]   Go Up
Jump to: