I am trying to make a presettable voltmeter. It will show voltage normally. But when it will exceed the SET value an LED will glow. I did it using a TOGGLE switch as MODE CHANGER. I want to ENTER the SET mode by pressing the OK & UP button together for 5 secs.
Other buttons in this program are
One UP button, one DOWN button, and an OK button that writes the SET value into EEPROM.
Please how can I enter into SET mode Longpress and EXIT by pressing the OK button.
Thank you
Longpress detection for mode change
Moderator: Benj
Longpress detection for mode change
- Attachments
-
- VOLTMETER PRESETTABLE.fcfx
- (23.85 KiB) Downloaded 91 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Longpress detection for mode change
That does look like an assignment?
My suggestion is used a delay loop that looks a the button inputs then exits when buttons are released.
While in the loop have a count macro.
I don't want to give too much away as Teachers regally check these forums.
My suggestion is used a delay loop that looks a the button inputs then exits when buttons are released.
While in the loop have a count macro.
I don't want to give too much away as Teachers regally check these forums.
Martin