New feature?

General discussion and support for Iambino and the Iambic Keyer Shield.

New feature?

Postby kb3cuf » Mon Feb 10, 2014 5:59 pm

I am a CW op, and trying to get HDSDR to work. I am going to hack a USB keyboard for contact closures on the enter key, using Radio output jack- that will probably work OK. I'd love it if the Iambino had a PTT activation output. The current HDSDR uses space bar as a latching TX. I am planning on adding to the Iambino code to implement the function in semi breakin fashion- TX will get toggled on (eqiv to a keypress- at the spacebar) at the first dit or dah and "kept alive until 1/2 second has gone by without any input. then the TX gets toggled off same way.

The other idea is using CAT>HDSDR and toggling a pin on the RS232- it remains to be seen if the pin is held high during the entire sending or if it is bang bang again.

I think there are 2 I/O pins uncomitted on the Arduino.

Thoughts, anyone?

73
DE KB3CUF
kb3cuf
 
Posts: 44
Joined: Thu Feb 06, 2014 1:51 pm

Re: New feature?

Postby AE9RB » Tue Feb 11, 2014 9:56 am

Yes, AD4 and AD5 pins are completely unused. These can be used for either analog input or digital I/O. You can buy an Arduino prototype shield and easily put it between the Arduino and keyer shield.

If you have an Arduino Leonardo then you don't need to hack up an actual keyboard or add circuits. Just use the Keyboard class.
73 David AE9RB
AE9RB
Site Admin
 
Posts: 511
Joined: Thu Nov 15, 2012 5:27 am
Location: Portland, Oregon, USA (CN85ql)

Re: New feature?

Postby AE9RB » Thu Feb 13, 2014 12:41 am

This was pretty easy to test. Windows only sends USB keyboard updates to your application every 8ms so it didn't work well beyond about 13 WPM. Here's the patch in case anyone wants to figure out how to make Windows behave better.

Code: Select all
--- a/iambino.ino
+++ b/iambino.ino
@@ -25,6 +25,7 @@ void setup() {
   digitalWrite(KEY_1, HIGH);
 
   Serial.begin(9600);
+  Keyboard.begin();
   lcd_setup();
   cfg_setup();
   dac_setup();
@@ -143,11 +144,15 @@ bool tx_flag = true;
 
 void tx_send(long mark) {
   if (tx_flag) digitalWrite(TX_PIN, HIGH);
+  Keyboard.press(KEY_RETURN);
   tx_timer = mark;
 }
 
 void tx_loop(long mark) {
-  if(tx_timer - mark < 0) digitalWrite(TX_PIN, LOW);
+  if(tx_timer - mark < 0) {
+    digitalWrite(TX_PIN, LOW);
+    Keyboard.release(KEY_RETURN);
+  }
 }
 
 bool tx_enabled() {
73 David AE9RB
AE9RB
Site Admin
 
Posts: 511
Joined: Thu Nov 15, 2012 5:27 am
Location: Portland, Oregon, USA (CN85ql)

Re: New feature?

Postby kb3cuf » Thu Feb 13, 2014 2:20 pm

Thanks for the code. I have a Leonardo inbound. I found the exact same results with my testing last night. Above 12-13 WPM (element spacing) my config added extra dits and code got very sloppy. :(

Obviously this kinda works but keyboard input of CW is not viable in the "production model"

73
Larry
kb3cuf
 
Posts: 44
Joined: Thu Feb 06, 2014 1:51 pm

Re: New feature?

Postby N2TOH » Fri Feb 20, 2015 6:50 pm

I'm working on modifying the code for the keyer to use AS a USB keyboard, I managed to expand the charter table out to most of the printable ASCII charters, but am stuck at including the non-printed "charters" so I can obtain the charrage return and line feed. with the printable charters I managed to create as many as 6 symbol "letters" that worked reliably, I'd like to be able to use as many as 8.

what's confusing me is the formatting in the declarations, once that's understood I should be able to include those additions.
N2TOH
 
Posts: 68
Joined: Sat Oct 12, 2013 12:55 pm


Return to Iambino

Who is online

Users browsing this forum: No registered users and 0 guests

cron