I hope to create an alarm clock with an i2C LCD 1602 module. I want to set the alarm time through it.
I did some googling and found out a library called "MENU" by accident for purposes like this. But it was for those ordinary LCD displays. And there were not enough documentation to find out about them.
I am looking for a 5 button system. LEFT/RIGHT to scroll through date&time. UP/DOWN to select date&time and a OK button to set selected variables.
Do I really need a library for this? If so what would it be?
Please provide me some sample example sketches so I can get a general idea. I have never done this before.
Is my post not clear enough
Take a look at the very first topic of this forum. It deals with such a display with buttons. It is available e.g. on AliExpress, if you search for it.
The I2C backpack is also available separately, I found it also on AliExpress. But then you need to connect the buttons separately.
I already have a i2C LCD display. I just need the technique of crating menus and interacting with them
Ok, sorry for you. It seems that you confound LCD and TFT. LCD are output only, T from TFT stands for Touch, so you can interact with it.
Hope this helps.
No, TFT does not stand for Touch. Ask Aunty Google.
You'll write your own buttonpress logic. Flowchart what it should do beforehand. Send off for five on-while-held pushbutton switches without delay and look in arduino examples to debounce and change a variable with a pushbutton to a digital input. On pinboard get the up/down buttons working first, using two scraps of wire until your hardware arrives. The libraries to get digital input from a switch to the arduino are very much all included in the compiler IDE so use their examples and then refer to your state flowchart.
Meanwhile, a library which you probably need might be an i2c LCD driver. A while back I got one from fmalpartida which did the trick, though it took me a while to find that the i2c address was not the same as gets written everywhere, it was 0x20 for that 16x2 i2c LCD. Test carefully that you can
to the LCD before proceeding to clock things.
By the way, you might want to tweak the local timekeeping which are counted as a second of time, as that can be a little bit off.