hello....
i need help with this i need it with Millis function
i need to make the Arduino if i press a button (button1) serial print "high" after 15minitues and every 15 minutes serial print "high" and doing this for 2 hours then stop doing it till i press the button again
and if i press another button (button2)
serial print "high" after 10minitues and every 5 minutes serial print "high" and doing this for 6 hours then stop doing it till i press the button again
Your topic has been moved to a more suitable location on the forum. Introductory Tutorials is for tutorials that e.g. you write, not for questions. Feel free to write a tutorial once you have solved your problem
Please edit your post, select all code and click the </> button to apply so-called code tags and next save your post. It makes it easier to read, easier to copy and prevents the forum software from incorrect interpretation of the code.
@abcda [irony] just keep on posting the same old stuff with the same mistakes and ignoring everything you have been told, you will be fine [\irony]
Alternatively you could start to change the code in response to what you have been told to do and perhaps maybe you might learn something. You might even get more than 0% for your assignment, you never know what you can do if you start to engage your brain.
So as BUTTON1 can not be changed and has the value of 13 how could it not equal HIGH?
You need to read the value of a pin using the digitalRead function. However if BUTTON1 is an output there is no point in reading it.
You should give your variables meaningful names, buttons should be connected to inputs not outputs. Outputs are for things like LEDs, so give the. Appropriate names. Your BUTTON can not be both an input and an output, it can only be one thing.