Fixed FMBeacon example, required slight modification to library. TO-DO notes in example header.
This commit is contained in:
@@ -3,16 +3,18 @@ Morse Code Beacon
|
||||
|
||||
Test beacon will transmit and wait 30 seconds.
|
||||
Beacon will check to see if the channel is clear before it will transmit.
|
||||
|
||||
TO-DO: Radio chip audio AGC too slow in responding to tones, worked around by playing a 6khz tone between actual dits/dahs.
|
||||
Should work on adjusting AGC to not require this.
|
||||
*/
|
||||
|
||||
// Include the HamSheild
|
||||
#define DDS_REFCLK_DEFAULT 9600
|
||||
#include <HamShield.h>
|
||||
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
// Create a new instance of our HamSheild class, called 'radio'
|
||||
HamShield radio;
|
||||
|
||||
// Run our start up things here
|
||||
@@ -42,8 +44,9 @@ void setup() {
|
||||
// Tell the HamShield to start up
|
||||
radio.initialize();
|
||||
radio.setRfPower(0);
|
||||
|
||||
// Configure the HamShield to transmit and recieve on 446.000MHz
|
||||
radio.frequency(145570);
|
||||
radio.frequency(438000);
|
||||
|
||||
Serial.println("Radio Configured.");
|
||||
}
|
||||
@@ -60,13 +63,13 @@ void loop() {
|
||||
radio.setModeTransmit();
|
||||
|
||||
// Send a message out in morse code
|
||||
radio.morseOut("KC7IBT ARDUINO HAMSHIELD");
|
||||
radio.morseOut(" KC7IBT ARDUINO HAMSHIELD");
|
||||
|
||||
// We're done sending the message, set the radio back into recieve mode.
|
||||
radio.setModeReceive();
|
||||
Serial.println("Done.");
|
||||
|
||||
// Wait 30 seconds before we send our beacon again.
|
||||
// Wait a second before we send our beacon again.
|
||||
delay(1000);
|
||||
} else {
|
||||
// If we get here, the channel is busy. Let's also print out the RSSI.
|
||||
|
||||
Reference in New Issue
Block a user