开云体育

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

ubitx sidetone only mode


 

I made a small modification to Farhan's original ubitxv4 code to add a CW learning mode where one can practice CW with the sidetone and not transmit it.

If anyone wants it, it is here: <>

It adds a menu called "Learn CW mode" which is set to false by default and can be turned on, after which, code will only be played back and never transmitted.

73
--
Ramakrishnan VU3RDD


 

Ramakrishnan,

If you're good with code, I wonder if you might be able to write a subroutine that allows an op to actuate a button press on a Nextion screen which latches a digital output to an "on" state, until pressed again (wherein the digital output goes low again).

Not being a computer code guy (or much of one),
I assuming I can throw that into the existing Arduino code and draw a button on a screen for it.

Wha do you think?

Ted
K3RTA


Jack Purdum
 

This is very easy to do. The question is what do you want to do when the pin is pulled low?

Jack, W8TEE

On Tuesday, March 12, 2019, 9:40:45 AM EDT, Ted via Groups.Io <k3rta@...> wrote:


Ramakrishnan,

If you're good with code, I wonder if you might be able to write a subroutine that allows an op to actuate a button press on a Nextion screen which latches a digital output to an "on" state, until pressed again (wherein the digital output goes low again).

Not being a computer code guy (or much of one),
I assuming I can throw that into the existing Arduino code and draw a button on a screen for it.

Wha do you think?

Ted
K3RTA


 

No, the end purpose may be a curiosity though it ins't a primary question so far as programming is concerned. Maybe I want faceplate work lights to go on and then off, maybe I want to switch antennas; the programming? is what needs to happen.?

I guess I should look it up and learn this stuff.

Ted
K3RTA



On Tue, Mar 12, 2019 at 9:54, Jack Purdum via Groups.Io
<jjpurdum@...> wrote:
This is very easy to do. The question is what do you want to do when the pin is pulled low?

Jack, W8TEE

On Tuesday, March 12, 2019, 9:40:45 AM EDT, Ted via Groups.Io <k3rta@...> wrote:


Ramakrishnan,

If you're good with code, I wonder if you might be able to write a subroutine that allows an op to actuate a button press on a Nextion screen which latches a digital output to an "on" state, until pressed again (wherein the digital output goes low again).

Not being a computer code guy (or much of one),
I assuming I can throw that into the existing Arduino code and draw a button on a screen for it.

Wha do you think?

Ted
K3RTA


 

Ted -

It should be very easy to do. I don't have a Nextion screen with me, but I can help you with modifications. Will message offline.

Ramakrishnan VU3RDD

On Tue, Mar 12, 2019, at 7:10 PM, Ted via Groups.Io wrote:
Ramakrishnan,

If you're good with code, I wonder if you might be able to write a subroutine that allows an op to actuate a button press on a Nextion screen which latches a digital output to an "on" state, until pressed again (wherein the digital output goes low again).

Not being a computer code guy (or much of one),
I assuming I can throw that into the existing Arduino code and draw a button on a screen for it.

Wha do you think?

Ted
K3RTA



--
Ramakrishnan


 

Hi Ted...
What you're looking for is a 2-state state machine with state transitions triggered by a button press.
So, a very simple outline would be (pseudocode)

loop:
??? if button_pressed do state_flip
??? do other stuff...
end_loop

function state_flip:
??? if current_state == ON
?????? set pin OFF
??? else:
?????? set pin ON
??? endif
??? record new current_state
end_function

I could just give you the code, but half the fun is in learning, no?
If you do just want the code, I will though.

/ Gerry


 

In my experience, "learning" code while trying to accomplish something with it is about as much fun as trying to balance a tennis ball on the end of a piece of strong.? Please feel free to share any lines as you like, and maybe I'll pick up something from working with it.


Tnx,

Ted