¿ªÔÆÌåÓý

Re: JackAl Board Debut


Jack Purdum
 

We don't do polling on the frequency encoder, we use an interrupt. When you're cruising along at 180MHz, it's pretty responsive to what you're doing. If you have set the increment to 1Hz, that's what you get.

Jack, W8TEE

On Monday, May 21, 2018, 11:01:21 AM EDT, Jerry Gaffke via Groups.Io <jgaffke@...> wrote:


Here's an option to fix undesired tuning changes when pushing the encoder switch.

Within function read_enc()? which returns the number of encoder ticks that have occurred,
use the Arduino millis() call to determine how long it has been since the non-zero return value.
If there has been a pause in activity of more than 1000ms, then return a result of 0 encoder shaft ticks
but retain an internal copy of the total number of accumulated ticks since the last non-zero return.
When that total number of accumulated ticks exceeds some threshold, then go ahead and
give a non-zero return value, but only return the final encoder read, not the total accumulated ticks.
Giving only the final encoder read value and discarding the accumulated ticks allows me to
advance the knob by just a few hz without overshoot.?

And it doesn't involve any 10 penny nails:

Jerry, KE7ER


?

On Mon, May 21, 2018 at 07:14 am, Jack Purdum wrote:
Some options to fix the "scoot" problem:
?
?? some non-skid rubber feet
?? a 10-penny nail through the case
?? a SPDT CO switch wired to the TUNINGENCODERSWITCH pin
?
Jack, W8TEE
?

Join [email protected] to automatically receive all group messages.