From 6787095a6c8d93e2bdc5cebc81976a5c9760f1fb Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Thu, 21 Apr 2022 22:16:32 -0600 Subject: [PATCH] Straight key buzzer on pin 7 --- README.md | 12 ++++++++++++ vail-adapter.ino | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c563f8..fce603b 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,18 @@ go into straight key mode. If you change from an iambic key to a straight key, you'll have to reset the adapter by unplugging it from the computer. +### Optional: buzzer + +If you connect a buzzer or speaker to pin 7 on one leg, +and ground on the other, +the adapter will beep when you press the straight key. + +This will help a lot if there is a noticeable delay between when you press the key +and when your computer starts making a local beeping sound. + +If you feel like no matter what you do, +you're always getting DAH with your straight key, +you should try this. ## Step 3: Load the code diff --git a/vail-adapter.ino b/vail-adapter.ino index 2c8a051..da3cb2a 100644 --- a/vail-adapter.ino +++ b/vail-adapter.ino @@ -17,7 +17,7 @@ # define DIT_PIN 12 # define DAH_PIN 11 # define KEY_PIN 10 -# define PIEZO 8 +# define PIEZO 7 # define LED_ON true #endif #define LED_OFF (!LED_ON) @@ -97,6 +97,12 @@ void midiProbe() { keyboard = (event.byte3 > 0x3f); break; case 0x8B01: // Controller 1: set iambic speed (0-254) + // I am probably never going to use this, + // because as soon as I implement it, + // people are going to want a way to select mode A or B, + // or typeahead, + // or some other thing that I don't want to maintain + // simultaneously in both C and JavaScript iambicDelay = event.byte3 << 1; break; }