开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Version 1.04 Function Button


howardmsmall
 

I have loaded v1.04 and see in the code that a button connected to the Arduino A3 when pulled low selects one of three functions.

When I try this, nothing happens and I am wondering what I have missed?

Howard, VK4BS


 

You missed post 22589: ?"There's a lot of stuff in the code that is started but far from functional. ?Namely the USB/LSB stuff, RIT, TX switching, CW, LPF switching, and dual VFO's. ?And Calibrate is broken in ways other than just this business of not reading EEPROM in setup()."


On Sun, Apr 2, 2017 at 04:47 pm, howardmsmall wrote:

I have loaded v1.04 and see in the code that a button connected to the Arduino A3 when pulled low selects one of three functions.

When I try this, nothing happens and I am wondering what I have missed?

?


 

开云体育

Look in void loop and uncomment check button. Been there...

Larry
Kb3CUF



Sent from my Galaxy Tab? E

-------- Original message --------
From: howardmsmall <howard@...>
Date: 4/3/2017 00:47 (GMT+00:00)
Subject: [BITX20] Version 1.04 Function Button

I have loaded v1.04 and see in the code that a button connected to the Arduino A3 when pulled low selects one of three functions.

When I try this, nothing happens and I am wondering what I have missed?

Howard, VK4BS


howardmsmall
 

Ah, thanks. So now the VFO A B switching works, in a sense, the copy A to B works. Cleaned up some of the display code and next will add the mode to allow the display to show if it is in tx mode. Not sure if the rit is working, seems not.


Will have a good look at the code and see if the button routines can be a little more predictable although it may be that my button hardware is the issue.


Howard, VK4BS


 

change the button defines to input_pullup unless you have 10K externals already in place from pin side to +5V.

i went to a 10 turn pot and like it.

Larry

On Sun, Apr 2, 2017 at 11:30 PM, howardmsmall <howard@...> wrote:

Ah, thanks. So now the VFO A B switching works, in a sense, the copy A to B works. Cleaned up some of the display code and next will add the mode to allow the display to show if it is in tx mode. Not sure if the rit is working, seems not.


Will have a good look at the code and see if the button routines can be a little more predictable although it may be that my button hardware is the issue.


Howard, VK4BS



howardmsmall
 

Larry

Have you had any luck getting vfo a and vfo b to hold their frequencies when you swap between them? As opposed to displaying the frequency they were on.


Howard


 

No, that seems to be an issue as well.? I think it needs to be written to EEprom.? However, the VFO is recalled correctly when the radio is power cycled.? It may just need a write cycle from the "old" VFO when the function button is pressed then a read cycle from EEprom when the "new" is switched in.

??Since I rarely if ever play with 2 VFOs its not of great concern to me.? I also don't see any USB/LSB code.? I wanted to see RIT work, and it does seem to, have not attempted transmit yet.?
??I'm more a listener .

Larry

On Mon, Apr 3, 2017 at 4:54 AM, howardmsmall <howard@...> wrote:

Larry

Have you had any luck getting vfo a and vfo b to hold their frequencies when you swap between them? As opposed to displaying the frequency they were on.


Howard



Jack Purdum
 

I couldn't decide how to preserve the current frequency when the rig (e.g., the old Forty-9er) was powered down. I couldn't update a frequency block in EEPROM each time the frequency was changed because of the finite EEPROM write cycle. I think I calculated that if I did that, the EEPROM would become flaky after 72 days of continuous use.

Instead, I used a software timer built into the Nano to decide if the user was simply tuning around the band, or if they have "stopped" at a particular frequency. Only when the user "rested" on a frequency for more than 30 seconds did I update the EEPROM block. You could do the same thing here. It's probably less of an issue since the change involves a switch press. Still, keep in mind the limited EEPROM write cycle.

Jack, W8TEE



From: Larry Acklin <acklin@...>
To: [email protected]
Sent: Monday, April 3, 2017 10:54 AM
Subject: Re: [BITX20] Version 1.04 Function Button

No, that seems to be an issue as well.? I think it needs to be written to EEprom.? However, the VFO is recalled correctly when the radio is power cycled.? It may just need a write cycle from the "old" VFO when the function button is pressed then a read cycle from EEprom when the "new" is switched in.

??Since I rarely if ever play with 2 VFOs its not of great concern to me.? I also don't see any USB/LSB code.? I wanted to see RIT work, and it does seem to, have not attempted transmit yet.?
??I'm more a listener .

Larry

On Mon, Apr 3, 2017 at 4:54 AM, howardmsmall <howard@...> wrote:
Larry
Have you had any luck getting vfo a and vfo b to hold their frequencies when you swap between them? As opposed to displaying the frequency they were on.

Howard




 

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


howardmsmall
 

Noel

Used this code - it works great! More reliable and responsive than the original.?

Thanks,

Howard, VK4BS


 

I've added this code snip to the Wiki


/g/BITX20/wiki/Raduino-Software-Hacks
--
73 de Noel, ZL1NC