Need help programming Arduino LCD 3 times a day Alarm clock

I'm using LCD 16x2 keypad shield on a arduino mega 2560 board.

I need help with programming an alarm clock that display date and time and is also able to do the following features:

-set time and date -able to set alarm 3 times a day. If alarm needed only 2 times a day, the program must be able to disable/not set the third alarm

I'm completely new to programming LCD on arduino and I don't even know where/how to start programming. Please help/guide me!! Thank you

For whichever LCD / Keypad shield you acquired, look it up with Google. There are libraries available. Download and install the library. The library will also have sample sketches for you.

What shield are you using? Where did you get it?

What do you intend to use to produce the alarm sound?

Once I made a clock with the date and time crammed into just one line of a 16x2 display. I suppose you could use one line for the current date and time and the second line to display the alarm times.

JaBa: For whichever LCD / Keypad shield you acquired, look it up with Google. There are libraries available. Download and install the library. The library will also have sample sketches for you.

If this is his/her first project ever, then he/she will need more help than just this. But at least it's a starting point, I guess.

Hi Bootomb_yay.

I think this is a good starting point ...

https://www.dfrobot.com/wiki/index.php/Arduino_LCD_KeyPad_Shield_(SKU:_DFR0009)

You can make use of the Time library. It has functions to convert date/time to a standardised unix timestamp (seconds since 1970/1/1) and back

So you can set a date/time and alarm times and compare the values to check if it's an alarm time. Once an alarm was triggered, you can increment the alarm time by one day.

Next you can use a millis() based timing to increment the unix timestamp every second. Be aware that Arduino timing is usually not 100% accurate. If you really need accurate time, you're better of using a RTC module; additional advantage is that it will not loose the time after a power loss.

If your shield is a shield with 4 or 5 buttons, you can use two buttons. Setting date, time and alarm times is a matter of incrementing variables that contain e.g. the year or the hour using one button till you have the correct value. Next you can use the second button to go to the next field (e.g. month or minutes) and repeat.

If your shield has e.g a 3x4 keypad, you can enter and display the year, hours etc directly and store them in an array and use e.g. the '#' key to accept the displayed value and store the numeric value that it represents in a variable.

I suggest that you start simple and get familiar with your shield first; how to display things, how to read buttons etc.

It all might sound complicated but it's reasonably simple.

sterretje:
I suggest that you start simple and get familiar with your shield first; how to display things, how to read buttons etc.

Questions to ask yourself:

  1. Can I write a sketch to make the shield display the number 12345 (or whatever my favorite number is)?
  2. Can I write a sketch to count the number of times I press a specific button (the UP button, let’s say) and show that number on the display? (in other words, a simple counter)
  3. Can I write a sketch to show the number of seconds since the Arduino was turned on? (in other words, a simple count-up timer)
  4. Can I modify sketch #3 to show minutes and seconds, instead of just seconds? (so 63 seconds would be displayed as 1:03, for example)
  5. Can I use the Arduino to produce a sound? (To make this work, you will need a buzzer or something to make the actual sound.)
  6. Can I combine sketches #2, #4, and #5 in such a way that, when the “counter” number (from sketch #2) matches the “minutes” number (from sketch #4), the Arduino makes a sound (like in sketch #5)?

Once you can answer “yes” to all six of these questions, you will be well on your way to making your project work.