This morning I threw together a keyer program for
Linux PCs and Raspberry Pi
http://abelian.org/ebnaut/ebkey.c
On the RPi, install ntpd with
(you might need to prefix these commands with sudo)
apt-get install ntp
Check it is working using
ntpq -p
which displays the time servers the daemon is using. After a
minute or two, at least one should show a '*' in the left column.
Download ebnaut.c and ebkey.c and compile with
gcc -std=gnu99 -O3 -o /usr/local/bin/ebnaut -Wall \
ebnaut.c -lm -lpthread
gcc -Wall -o /usr/local/bin/ebkey ebkey.c
Run in test mode to toggle GPIO output 7 (pin 14) with
one second period
ebkey -t -S1 -m rp,gpio=7 -v
A voltmeter between pins 13 (ground) and 14 (GPIO7)
should show alternating zero and 3.3V.
Send a message with
echo 'test message' |
ebnaut -et -N12 -p8K19A |
ebkey -S0.1 -m rp,gpio=7 -T +60 -r 300 -vv
The -T +60 tells it to start at the next whole UTC minute
and -r 300 makes it repeat on 5 minute slots.
On a PC it uses a serial port DTR and RTS, eg
echo 'test message' |
ebnaut -et -N12 -p8K19A |
ebkey -S0.1 -m dtr+rts,dev=/dev/ttyS0 -T +60 -r 300 -vv
For summary of options
ebkey -?
See
https://www.raspberrypi.org/documentation/usage/gpio/
for GPIO pin connections.
--
Paul Nicholson
--
|