Pages: [1]   Go Down
Author Topic: Arduino Kitchen Timer  (Read 1051 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I have been trying to make an Arduino Kitchen Timer for quite some time now. After lots of troubleshooting I have managed to get it almost working! So far the design is that a normal LED Bar Graph counts up when a button is held, then each LED turns off every five minutes. The code so far is as follows:

http://www.mediafire.com/?4hwd25wf0n8qq91

The Fritzing sketch is as follows, but please note that LEDs are not used!



The issue that I am struggling with at the moment is not one of Hardware, I know that it all works and is in theory wired correctly. At the moment I am noticing that when the 6th LED bar lights up there is more of a delay, and that the timer is not counting past 5 mins. I have also not wired in the Piezo speaker as I don't have on.

I hope you can help me smiley
Ari
« Last Edit: June 02, 2011, 11:14:08 am by anonymouse197 » Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 207
Posts: 12925
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


The link in your post produces rather nasty pop-up advertisements.  Please remove the link or I will ask the moderators to consider your message spam and remove it.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 614
Posts: 49365
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have nothing to do in the else block, just omit it. Empty else blocks look silly.

Some useful reading here:
http://arduino.cc/en/Reference/Array

Why is there a 3 second delay in setup()? Are you waiting for the genie to appear and clean the kitchen?

More useful reading:
http://arduino.cc/en/Reference/For
Computers are good at repetition. Let the cooper replicate the code (by using a loop) instead of you doing it using copy/paste.

Also:
http://arduino.cc/en/Reference/Increment

Code:
   analogWrite(speakerOut,128);
The analogWrite() function only works on PWM pins. Pin 1 is NOT a PWM pin.

Quote
At the moment I am noticing that when the 6th LED bar lights up there is more of a delay, and that the timer is not counting past 5 mins. I have also not wired in the Piezo speaker as I don't have on.
Have you tried using Serial.print() to see what is happening? Of course, you'll need to change the value in speakerOut, since pin 1 is part of the hardware serial port.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My Apologies 'Coding Badly', as you will see the code I would like to post exceeds the maximum message length for the forum so I have had to post it elsewhere, I will look for an alternative place to post it.

The 3 second delay is giving people time to reset the device then press and hold the button, it is just for ease of use - but thank you for the help, I will have a look at the background reading that you have offered.

Thanks!  smiley
Logged

CO, USA
Offline Offline
God Member
*****
Karma: 5
Posts: 711
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you waiting for the genie to appear and clean the kitchen?

And when she's finished, can you send her over?
Logged

... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier

Pages: [1]   Go Up
Jump to: