F4GOJ Christophe [email protected]
F4GOH Anthony [email protected]
October 2014
Use this library freely.
To use the HFBEACON library:
- Go to https://github.com/F4GOJ/HFBEACON, click the Download ZIP button and save the ZIP file to a convenient location on your PC.
- Uncompress the downloaded file. This will result in a folder containing all the files for the library, that has a name that includes the branch name, usually HFBEACON-master.
- Rename the folder to HFBEACON.
- Copy the renamed folder to the Arduino sketchbook\libraries folder.
The HFBEACON library instantiates a Beacon object, the user does not need to do this.
To use the HFBEACON library, the AD9850SPI and SPI libraries must also be included.
#include <HFBEACON.h> // http://github.com/F4GOJ/HFBEACON
#include <AD9850SPI.h> // http://github.com/F4GOJ/AD9850SPI
#include <SPI.h> // http://arduino.cc/en/Reference/SPI (included with Arduino IDE)
Enable RSiD in PSK, RTTY and Hell modes.
Beacon.rsidToggle(rsidEnable);
rsidEnable : true to enable or false to disable RSiD transmission (default is true) (boolean)
None.
void setup(){
Beacon.rsidToggle(false);
}
Transmit a string in morse code.
Beacon.cwTx(freqCw, stringCw, cwWpm);
freqCw : Frequency of transmission. (long)
stringCw : String to transmit (not case sensitive) (char array)
cwWpm : Speed of transmission in words per minute. (int)
None.
void loop(){
Beacon.cwTx(10141000, "f4goj 30m bcn test f4goj", 20);
while(1);
}
Transmit a string in BPSK 31 mode.
Beacon.pskTx(freq, stringPsk, modePsk, baudsPsk);
freq : Frequency of transmission. (long)
stringPsk : String to transmit (char array)
modePsk : Mode (ascii code of B for BPSK and Q for QPSK) (integer)
baudsPsk : Baud rate (31, 63, 125) (integer)
None.
void loop(){
Beacon.pskTx(14070000, "f4goj 20m beacon test f4goj", 'B', 31);
while(1);
}
Transmit a string in RTTY 45 mode.
Beacon.rttyTx(freqRtty, stringRtty);
freqRtty : Frequency of transmission. (long)
stringRtty : String to transmit (not case sensitive) (char array)
None.
void loop(){
Beacon.rttyTx(14070000, "f4goj 20m beacon test f4goj");
while(1);
Encode callsign, locator, transmit power if not done and transmit them in WSPR-2.
Beacon.wsprTx(freqWspr, callWsprTx, locWsprTx, powWsprTx);
freqWspr : Frequency of transmission. (long)
callWsprTx : Callsign (not case sensitive) (char array)
locWsprTx : Locator (4 characters long, not case sensitive) (char array)
powWsprTx : Transmit power (in dBm) (char array)
None.
void loop(){
Beacon.wsprTx(10140131, "f4goj", "in97", "33");
while(1);
Encode callsign, locator, transmit power.
Beacon.wsprEncode(callsign, locator, power);
callsign : Callsign (not case sensitive) (long)
locator : Locator (4 characters long, not case sensitive) (char array)
power : Transmit power (in dBm) (char array)
Update wsprSymb[] and wsprSymbGen variables
void loop(){
Beacon.wsprEncode("f4goj", "in97", "33");
while(1);