Aquarium Doser

First of all, I fully understand that the code I have written for this project is laughable to anyone with experience coding. I also want to say that after reading through much of the forums, I am a bit nervous to post here at all. I'm sure to many of you on here this question I have is "DUMB" but I'm going to ask anyway... I do want everyone to understand that I am only asking for guidance and I'm NOT looking for someone to do this for me. I want to learn what I'm doing wrong, and what I'm doing right.

Okay, I have attached the code that I have written to turn off and on dosing pumps at a specified time. Please ignore the commented sections that have to do with a temp. sensor, that's something else I'm working on... There is a 16x2 LCD that displays the time and my business name. The time is kept by a DS1307.

I'm sure that I'm leaving out information that is needed but here's what I'm trying to do now. I have 5 push buttons that I would like to use to set the time at which the pumps turn on. I want to be able to press the "Menu" button and change the display to the "motor on/off time" and once I'm done adjusting, have it go back to displaying the "Time Now".

I know that I'm making this much more difficult than it needs to be so any help will be great. Thank you for your time.

Attempt_at_AMPM.ino (6.66 KB)

So what is the question? What does it do? What do you want it to do?

    if((hour == 10)&(minute == 49)&(second == 00)){

Those & (bitwise and) should really be && (logical and).

I suggest you use the "auto format" tool in the IDE, to add some nice indentation into your code.

My apologies for not being clear on where I need help. I want to know how to code push buttons so that I may adjust the time that the motors turn on. I need to be able to view the adjustments on my 16x2 LCD display. From what I can tell, I need to create a menu that is brought up at the push of one of the buttons but I'm unsure of where to go from there. If there are links to examples of this or if you can give me an example of this it will be much appreciated. I know there are going to be many changes in the code I provided to make it work the way I want but I wanted everyone to be able to see where I'm at and help understand what I'm trying to do. As I stated previously, I know there are a lot of things I have done that are laughable to anyone that knows what they are doing. I'm just proud of myself for getting this far. I will learn how to use the auto format tool and clean everything up. I appreciate you taking the time to look at this.