Jack
You might find this code snip useful, I use this with the push-button on a rotary encoder to deduce a short-press from a long-press.
Perhaps use a long-press of the? VFO A/B button to save to EEPROM??
here's the code snip anyways
? // is knob PRESSED
? if (digitalRead (encS) == 0) {????? ? ?? // encoder switch IS pressed
??? while (digitalRead (encS) == 0){??? // while it's held down
????? ButtonDown++;?????????????????????????? // incriment the delay counter
????? delay(100);
????? if (ButtonDown == 10) {???????? ? ? ? // if button held for 1s
??????? eeSave();?????????????????????? ? ? ? ? ?? // go to LONG-PRESS routine
??????? break; }
??? }
??? if (ButtonDown < 10) TuneStep();? // go to SHORT-PRESS routine
??? ButtonDown = 1;
? }
Hope you find it useful / entertaining!!
--
73 de Noel, ZL1NC