Coder Social home page Coder Social logo

k3ng / k3ng_cw_keyer Goto Github PK

View Code? Open in Web Editor NEW
409.0 77.0 212.0 5.01 MB

K3NG Arduino CW Keyer

Home Page: http://blog.radioartisan.com/arduino-cw-keyer/

License: GNU General Public License v3.0

C++ 67.69% C 32.26% Makefile 0.05%
arduino morse-code amateur-radio cw-keyer cw-beacon cw-decoder

k3ng_cw_keyer's Introduction

k3ng_cw_keyer

K3NG Arduino CW Keyer

The K3NG Keyer is an open source Arduino based CW (Morse Code) keyer with a lot of features and flexibility, rivaling commercial keyers which often cost significantly more. The code can be used with a full blown Arduino board or an AVR microcontroller chip can be programmed and used directly in a circuit. This keyer is suitable as a standalone keyer or for use permanently installed inside a rig, especially homebrew QRP rigs. It’s open source code so you can fully customize it to fit your needs and also perhaps learn from it or find coding ideas for other projects.

Documentation is located here: https://github.com/k3ng/k3ng_cw_keyer/wiki

k3ng_cw_keyer's People

Contributors

7m4mon avatar billyf avatar cniesen avatar cstroie avatar dfannin avatar edgarbarranco avatar f5mdy avatar federicobriata avatar flickerfly avatar frugalguy avatar giorgiofox avatar git1k2 avatar iz3gme avatar k3ng avatar ok1cdj avatar on6zq avatar radio-miskovice avatar swalberg avatar toyo avatar vk2efl avatar w6ipa avatar woodjrx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

k3ng_cw_keyer's Issues

NanoKeyer rev D pin D2

I am noticing several strange issues, after uploading newest code upon startup the speaker "thumps" twice but does not play the normal CW HI and the D2 left side of my paddle will not work. When attempting to use winkeyer it will send these "thumps" instead of true CW. I can downgrade the code and everything works fine. I'm in the process of comparing the differences to see what the issue might be.

Keyboard.h missing

Keyboard.h is not included in the project.

#if defined(FEATURE_CW_COMPUTER_KEYBOARD) 
  #include <Keyboard.h>
#endif //defined(FEATURE_CW_COMPUTER_KEYBOARD)

link

Maybe i missed some instructions but I can't find the file anywhere.

73 and thank you for this great piece of software :)

command mode speed 255 after download

building the 25 feb load on a teensy 3.2
I have set" #define initial_command_mode_speed_wpm 20 // "factory default" command mode speed setting"
when i download it gets set to 255

\S
Iambic A
Buffers: Dit On Dah On
WPM: 15
Command Mode WPM: 255
Sidetone: On 1500 hz
Dah to dit: 3.00
Weighting: 50
Serial Number: 1
Potentiometer WPM: 25 (Activated) Range: 13 - 35 WPM
Wordspace: 7
TX: 1
Quiet Paddle Interrupt: 52
Mill Mode Off
Memory 1: CQ CQ CQ DE G4FRE
Memory 2: G4FRE
Memory 3: WW2R
Memory 4: MW2I
Memory 5:{empty}
Memory 6:{empty}
Memory 7:{empty}
Memory 8:{empty}
Memory 9:{empty}
Memory 10:{empty}
Memory 11:{empty}
Memory 12:{empty}

if i do a factory reset I get the same result
I cannot find a command to set the command mode speed, and i cannot key at 255

the build errors are:-

k3ng_keyer: In function 'void loop_element_lengths(float, float, int)':
k3ng_keyer:5564: warning: statement has no effect
sending_mode == AUTOMATIC_SENDING_INTERRUPTED;

                       ^

k3ng_keyer:5459: warning: unused variable 'endtime'
unsigned long endtime = micros() + long(element_lengthlengths1000) + long(additional_time_ms*1000);

               ^

k3ng_keyer: In function 'void service_paddle_echo()':
k3ng_keyer:11035: warning: unused variable 'character_to_send'
byte character_to_send = 0;

    ^

k3ng_keyer:11036: warning: unused variable 'no_space'
static byte no_space = 0;

           ^

k3ng_keyer: In function 'void serial_tune_command(usb_serial_class*)':
k3ng_keyer:11683: warning: variable 'incoming' set but not used
byte incoming;

    ^

k3ng_keyer: In function 'byte play_memory(byte)':
k3ng_keyer:14597: warning: control reaches end of non-void function
}

^

k3ng_keyer: In function 'void serial_program_memory(usb_serial_class*)':
k3ng_keyer:13805: warning: 'memory_number' may be used uninitialized in this function
EEPROM.write((memory_start(memory_number-1)+memory_index),255);

                                 ^

i think the last one is because i have set memories to 4 as I only want 4 buttons \s lists 10?

Dave
g4fre

ptt_input_pin problem

Hi,
I am trying to use ptt_input_pin. Configuration is like this:
#define ptt_input_pin 3

#define ptt_input_pin_active_state LOW
#define ptt_input_pin_inactive_state HIGH

Pin works almost correct. It means I can manualy put PTT on, but from CLI I cannot use \U command, which always return ptt_input_pin state even if it is inactive. Can anyone check this ?

Version 2018.05.28.01

Keying and decoding at the same time?

Hi,
Can anyone tell me if it should be possible to simultaneously decode what you send with the keyer if I use an Arduino Mega?

Thanks.
73, Albert PA3GUK

Software question

Hello.
I am not a programmer, but after browsing the code I have a few questions because the compiler shows warnings.
Line 7428, declaration:
byte number_sent = 0;

and the comparison below:
if ((number_sent > -1) && (number_sent < 10))

but byte it's an typedef uint8 byte;, so it's always bigger than a -1.
This is the case in several places.

It is similar in line 12674:
byte memory_number = serial_get_number_input(2,0, (number_of_memories+1), port_to_use, RAISE_ERROR_MSG);

and the comparison below:
if (memory_number > -1) {...}

the compiler informs you that this condition is always met.
I compile STM32F103.

73, Krzysztof

Winkey support option

Please check line 6642:

if ((configuration.sidetone_mode == SIDETONE_ON) || (configuration.sidetone_mode == SIDETONE_PADDLE_ONLY)) {byte_to_send | 2;}

Shouldn't it be

if ((configuration.sidetone_mode == SIDETONE_ON) || (configuration.sidetone_mode == SIDETONE_PADDLE_ONLY)) {byte_to_send = byte_to_send | 2;}

73 de Lefteri

Problem with command buttons

After wiring 6 buttons (command + 5 memories) with 10k and 1k resistors as default, if I press the command button it perfectly works, but if I press memory 1 it plays memory 2, if I press memory 2 it plays memory 4 and so on. I tried changing resistor values in the code but it doesn't seem to change anything.
Any help would be appreciated, thanks.

License?

What license is this project released under? I see some libraries are (L)GPL2, but there is no clear license listed for the K3NG keyer project itself.

Error detection problem in 5 char progressive training

I notice that the error sidetone boop feedback doesn't come until you reach the character number of the current loop. For example if you are currently on the 3rd character but make a mistake sending the first or second character of the string there is no error detected until a 3rd character is sent on the paddles. Shouldn't the error detection be active from the first character? Also a pause greater than one intercharacter space should result in an error as well (IMHO).

16x2 LCD won't compile

I'm using a LCD1602 module (non-shield). Two things of note:

  1. There's no clear pin listing, just a statement that it just works. For guys like me, knowing what the pins are can be quite helpful.

  2. The code doesn't compile. It complains about memory_start not being defined. (k3ng_keyer.ino
    line 7559)

For now I commented out that portion of the code and I figured out the pins (at least the screen seems to work fine). Everything seems fine, but I thought I'd file the issue here to make it better for others in the future if you can tidy it up.

Awesome project btw, thanks so much! 😄

Keypad added

Sir Anthony:
I have added a 4x4 keypad to the code and eliminated the memory resistor ladder and pushbutton switches. The only button that remains active is the COMMAND button.

10 memories are recognized. Using a 4x4 keypad, there are 6 keys that are not used, but these could be configured to do a multitude of tasks. Such as using the "C" key to enter COMMAND MODE.

The implementation is using an Arduino Mega 2560.

The code will also recognize a 3x4 keypad.

Are you interested in this code?

Jack-W0XR

Winkey and character P

Hello all, winkey emulation does not play character P, completely ignore it. Tested with N1MM+ and WKTest by K1EL.
Any idea where is problem ?

73 Ondra

Command Mode: Add Callsign Practice

Feature Request: Add the ability to start callsign practice mode from command mode. I propose using C as the command to trigger it.

I'll take a whack at this at some point unless someone beats me to it which is cool.

If I understand what I've read correctly, currently the only way to start up call sign practice mode is to have the CLI feature turned on to trigger it. It seems like it would be useful to be able to trigger this from command mode; especially for those using the smaller arduinos since CLI takes up a lot of program space.

I believe this needs to be implemented in the command_mode() function in k3ng_keyer.ino around line 4731. I'm looking at implementing basically a copy of this when I have a bit more time to look at it and figure out how the case statements work.

    #ifdef FEATURE_ALPHABET_SEND_PRACTICE
      case 111:
        send_dit(AUTOMATIC_SENDING);
        command_alphabet_send_practice(); // S - Alphabet Send Practice
        stay_in_command_mode = 0;
        break;
    #endif  //FEATURE_ALPHABET_SEND_PRACTICE

I think the function to call is us_callsign_practice(), but I have a good bit of research before being sure how this should work.

8 bit lcd compatibility?

Hi, I'd like to use a smaller 16x1 lcd for my keyer. The lcd I have sourced uses 8 data lines instead of 4.
The arduino LCD library supports 8bit lcds so its just a matter of adding the data lines to K3NG code.

Anyone know which files would need modification?

Thanks
-Dana KN4BEv

Compile Error

First time on GitHub so excuse the errors.

I've been trying to compile the code and got hundreds of errors (too long to list). First one to list: `JoystickReportParser::Parse(HID_, bool, unsigned char, unsigned char_)':
and then ... some more.

I did put the libriaries in: C:\Program Files (x86)\Arduino\libraries as per README file.
What am I doing wrong?

EDIT:
Woops! My bad!
Faulty Arduino! Plugged another one and it works. Well compile works that is.
Still I have these messages:

Invalid library found in C:\Program Files (x86)\Arduino\libraries\Key_CW: C:\Program Files (x86)\Arduino\libraries\Key_CW
Invalid library found in C:\Program Files (x86)\Arduino\libraries\Key_CW: C:\Program Files (x86)\Arduino\libraries\Key_CW

OLED Support

It would be great if the keyer would support OLED screens for Arduinos

E24C1024.h not found

When trying to compile the current git version for a Due, compilation aborts with the error:

k3ng_keyer.ino:386:24: fatal error: E24C1024.h: No such file or directory

This is with FEATURE_EEPROM_E24C1024 set in keyer_features_and_options.h and HARDWARE_ARDUINO_DUE set in keyer_hardware.h

I downloaded the ARM build environment from inside the Arduino 1.6.5 IDE. This file does not seem to be part of the stdlib or anything. Probably this is just a simple case of a forgotten 'git add E24C1024.h'

Regards and thanks
Matt

k3ng---Keypad

Sorry, Anthony, but I have been unable to figure out generating a "PULL" on Github. I have worked on it for hours now. The dense just get denser, I guess.

I submitted the code for the keypad to you on your regular E:mail account. If that's not satisfactory, I guess we can just drop it.

Sorry 'bout that

Jack-W0XR

CW side tone frequency

Hi,

Got a simple version running on a Mini-Pro.
I seem to be unable to change the side tone frequency, it stays at 600Hz whatever I fill in at
#define initial_sidetone_freq 500
in keyer_settings.h
If I change #define initial_speed_wpm to 12 in the keyer-settings.h, that will work.

Thanks!
73 de Albert, PA3GUK

nanoKeyer Rev D. WinKeyer Emulation - ESC should stop keying midstream character

I primarily use K3NG/nanoKeyer with N1MMPlus and when contesting I like to terminate keying instantly and not have the winkeyer emulation finish the current character and then terminate the keying macro sent from N1MM after the current character being sent finishes (via the ESC key while calling CQ in N1MM for example). I'm compiling the K3NG keyer with the defaults for nanoKeyer rev D. PCB. I looked through all the header option files and couldn't find anything obvious for an option to terminate keying instantly rather than waiting for the current character to complete sending as described above. The OEM USB WinKeyer works this way.

The only change I'm making before compiling the sketch is to update the keyer_hardware.h to enable the nanokeyer rev D options. I leave the default options in the rev d nanokeyer header as defaults.

Thanks! Max NG7M

STM32 Blue Pill implementation

I cannot include PS 2 keyboard feature. I keep getting
fatal error: avr/io.h: No such file or directory

Searching the web I have found avr/io.h doesn't work on STM microcontrollers
Is there any way around ?
Has anyone actually tried this keyer on STM32 ? Is it working ?

WinKey Params not compiling

Latest version software (1-5-17):

k3ng_keyer:6876: error: 'WINKEY_LOAD_SETTINGS_PARM_1_COMMAND' was not declared in this scope

  case WINKEY_LOAD_SETTINGS_PARM_2_COMMAND:

This continues for all 15 Params. Also other issues with Winkey Emulation too numerous to list here.

Thanks for any help. Been trying to run down the problem for 2 days with no luck.

FEATURE_COMMAND_MODE_PROGRESSIVE_5_CHAR_ECHO_PRACTICE - LCD Not cleared

I might be too quick to grab FEATURE_COMMAND_MODE_PROGRESSIVE_5_CHAR_ECHO_PRACTICE.

After entering the mode, the display shows the correct text about the practice, then reverts to the previous screen. This might be FAD.

Down in
void command_progressive_5_char_echo_practice()

There is:
lcd.clear();

Which does clear the display, but doesn't set the state so the next call to service_display() restores the previous screen.

Calling lcd_clear() alleviates this.

Again, this might be FAD, but the text on the screen (From what I was sending previously) tripped me up a lot.

-Glen
(N1XF)

CW keyer for a STRAIGHT key...

Would it be possible to add code to make a functional input for straight keys (as opposed to a simple pass-through)?

The idea is that the key input would not only be de-bounced for straight keys, but also automatically send a perfect single dit (when the key is pressed down for a short time) and a perfect dah (when pressed for a longer period of time).

Obviously, it would also have automatic spacing as well as some dit/dah memory.

Just thought I'd throw it out there...

Winkey - no echo

I am experiencing a problem with Winkey emulation. The keyer does not seem to send the echo and thus the client program (N1MM+ in this case) gets stuck and does not revert to RX after sending a code.

To verify, I have tried the program WKRemote from hamcrafters.com and it connects to the keyer but responds with the error "Attach WK: No Echo"

I am using an Arduino Uno.
I have read the notes here and tried "DisablingAutoResetOnSerialConnection" but no luck.
I tried in Windows 10 and 7, also tried on a Nano, but the same result.

73
de
VU3BOJ

Sequencer

Adding sequencer routine with TAIL and LEAD delays. Declare pins for PTT PA and PTT TRX.
This option will be useful for HF PA. First switch TX on PA side, second switch TX on TRX side.

Warnings

I get 3 warnings while compiling.
1.) 14688:5: warning: "/" within comment [-Wcomment]
2.) :5297:27: warning: statement has no effect
sending_mode == AUTOMATIC_SENDING_INTERRUPTED;
3.) 5185:19: warning: unused variable 'endtime'
unsigned long endtime = micros() + long(element_length
lengths1000) + long(additional_time_ms1000);

Anyone gets this?
I can easily just delete the first one but the rest is much more difficult.
Also, they are just warnings. It does program the board.

winkey emulation cw speed change during sending

I am running the winkey emulation on a teensy 3.2. I have speed potentiometer enabled. Using n1mm to drive the software, if i set the cw speed to 20wpm and press the cq button in n1mm the "CQ" is sent at 20wpm the rest of the message is sent at 31wpm (the potentiometer speed). If I disable the speed potentiometer the whole "CQ" is sent at 20wpm as would be hoped. Is the potentiometer being sampled during winkey sending and over riding the speed requested by winkey?

Dave
g4fre

WinKeyer Emulation (2) 'echo back' not working DXLab WinWarbler

Goody, just adding this here for tracking... text from my original post on the main forum: In DXLab WinWarbler, you can setup the WinKeyer settings to do an echo back so you see the letters you are sending with the paddle, nice if someone is practicing. What is happening in the latest code (or this issue has always existed) is that the echo back is sending the individual dits and dahs and not the letters. So if I send a bunch of V's you see EEETEEET in the echo back from the Winkeyer Emulation instead of the letter V, or if you send a string of dits or dahs you see the whole string as e's or t's. The only header file changes I have made is to select the Rev D nano keyer… no other defaults changed in the latest k3ng keyer code. Here are a couple of images for reference. Fixing this would just give it another level of compatibility to the actual Winkeyer.

N1MM '<' wpm speed changes when interrupted won't return CW Sending Speed to Originally set speed

Hi Goody, (here is my post that contains the description of this bug in WinKeyer emulation when using N1MMLogger+), I haven't been using my N3NG nanoKeyer for awhile due to the funky keying speed changes I was experiencing. First off, for me when running QRQ contesting CW, I must have serial port checking while sending CW. So to enable the option that disables serial port checking while sending CW is a show stopper for me. (enabling OPTION_DISABLE_SERIAL_PORT_CHECKING_WHILE_SENDING_CW is NOT an option because it breaks winkeyer like functionality) I can't deal with waiting for the current character to complete sending after hitting ESC, for example. This is not WinKey behavior with N1MM and I appreciate you adding serial port checking while sending several months ago. The following is a setup description of my setup... and at the end of the message, I describe the bug and how to duplicate it in N1MM. Just jump to the end to see the bug / duplicate the bug description if you are not interested in my setup for k3ng and the nanoKeyer rev d PCB.

I thought I would give the nanoKeyer another try and this go around, do more testing to see if I could help debug the mystery of the sending speed changing on the fly. So for this testing, I bought an OEM Arduino Nano to rule out any problems with the cheap clone nano boards (not that they bad), I just didn't want that in the mix. So for the follow testing where I can duplicate one sending speed change issue, I'm using a 'real' nano with the FDTI chipset as the base line with the Rev D nanoKeyer PCB etc... I'm using version 1.8.1 of the Arduino IDE with the latest K3NG code off the master branch as of the date/time of this message. Libraries are down the default k3ng_cw_keyer/libraries path by default when I open the sketch from the GitHub repo clone. The sketch compile is clean, no warnings or errors.

In keyer_hardware.h:
#define HARDWARE_NANOKEYER_REV_D

In keyer_features_and_options_nanokeyer_rev_d.h:
The only change is to make sure and DISABLE:
//#defineOPTION_DISABLE_SERIAL_PORT_CHECKING_WHILE_SENDING_CW

No other changes to the default rev_d.h features and options. I also have ASR disabled via the nice jumper on the nanoKeyer Rev D board.

Okay... now for the details on duplicating one of the speed change bugs in N1MM. And, I hope this might explain other cases where there is a potential of a speed change related to the following:

In N1MM macros for sending CW, you can use '<' and '>' characters to dynamically change sending speed on the fly via a macro by + or - 2wpm. So a common macro for sending a singnal report would be to use this Macro in N1MM:

F2 Exch,<<<<<5nn>>>>> {EXCH}

For each '<' in the above macro the cw speed is increased by 2wpm and then for each '>' it's decreased by 2wpm. So you get the turbo fast 5NN in this case and then the exchange is sent at the currently set WinKeyer speed. This works great with the K3NG code as expected... the use of these <> chars send the cw speed changes down to the nanoKeyer in winkeyer emulation and the speed changes for the 5NN and then returns to the previous speed for the expanded EXCH macro. All is well in k3ng winkeyer emulation mode. :)

So here is the bug when serial port checking is enabled while sending in the K3NG code... I may have lead you to the obvious here. IF, you stop CW sending in the middle of the 5NN after the <<< chars have increased the CW sending speed using the ESC key for example... the keying is stopped, but the currently set sending speed is NOT set back to the previous normal sending speed. i.e. in the above example, if I'm sending at 30wpm and I interrupt the sending after the <<<<< +2wpm commands have been sent to the keyer, the k3ng / nanoKeyer is set to 40wpm.

With an actual WinKeyer, this is not the behavior... when you interrupt the keying in the middle of the 5NN after the speed has been increased, the speed of the WinKeyer is set back to the previous speed before the <<< macro chars were used. It's very easy to duplicate. So, I think this will be an easy issue to resolve in the code, but thinking through it might make you think of other cases where the sending speed needs to be set back to the previous 'set' sending speed after something has been interrupted, or for that matter, in the event there is a keying interruption, always set the speed back to the previously set speed. The WinKeyer implementation is clearly working this way... or N1MM is sending other commands down to set the previous speed that are not getting interpreted by the k3ng code.

Hope that makes sense... it's a verbose explanation, but at least it's very easy to duplicate in N1MMLogger+.

Thanks for reading... Max NG7M

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.