From 0ed024cd7d4b8038708fd44f232367b1cbac92ec Mon Sep 17 00:00:00 2001 From: nick6x Date: Sat, 13 Aug 2016 14:05:19 -0700 Subject: [PATCH] Add comments, update to new HamShield library standard. --- .../AFSK-PacketTester/AFSK-PacketTester.ino | 16 ++++++++++---- .../AFSK-SerialMessenger.ino | 18 ++++++++++----- examples/AX25Receive/AX25Receive.ino | 2 -- .../CrystalCalibration/CrystalCalibration.ino | 2 +- examples/DDS/DDS.ino | 13 +++++++++-- examples/FMBeacon/FMBeacon.ino | 22 +++++++++++++------ .../{ => FixMe}/Identifier/Identifier.ino | 0 examples/FoxHunt/FoxHunt.ino | 11 +++++++++- examples/FunctionalTest/FunctionalTest.ino | 11 +++++++++- examples/Gauges/Gauges.ino | 2 +- examples/HandyTalkie/HandyTalkie.ino | 18 ++++++++++++++- examples/JustTransmit/JustTransmit.ino | 2 +- examples/KISS/KISS.ino | 11 ++++++++++ examples/PSK31Transmit/PSK31Transmit.ino | 12 ++++++++++ examples/Parrot/Parrot.ino | 2 +- examples/QPSK63Transmit/QPSK63Transmit.ino | 12 ++++++++++ examples/SSTV/SSTV.ino | 14 ++++++++---- examples/SSTV_M1_Static/SSTV_M1_Static.ino | 12 ++++++++++ .../SerialTransceiver/SerialTransceiver.ino | 13 ++++++++--- 19 files changed, 159 insertions(+), 34 deletions(-) rename examples/{ => FixMe}/Identifier/Identifier.ino (100%) mode change 100755 => 100644 diff --git a/examples/AFSK-PacketTester/AFSK-PacketTester.ino b/examples/AFSK-PacketTester/AFSK-PacketTester.ino index 47d9bf6..fc505d1 100644 --- a/examples/AFSK-PacketTester/AFSK-PacketTester.ino +++ b/examples/AFSK-PacketTester/AFSK-PacketTester.ino @@ -1,7 +1,15 @@ -/* Serial glue to send messages over APRS - * - * To do: add message receive code - * +/* Hamshield + * Example: AFSK Packet Tester + * This example sends AFSK test data. You will need a seperate + * AFSK receiver to test the output of this example. + * Connect the HamShield to your Arduino. Screw the antenna + * into the HamShield RF jack. Connect the Arduino to wall + * power and then to your computer via USB. After uploading + * this program to your adruino, open the Serial Monitor to + * monitor the process of the HamShield. Check for output on + * AFSK receiver. + + * Note: add message receive code */ #define DDS_REFCLK_DEFAULT 9600 diff --git a/examples/AFSK-SerialMessenger/AFSK-SerialMessenger.ino b/examples/AFSK-SerialMessenger/AFSK-SerialMessenger.ino index ba986da..eeb47cb 100644 --- a/examples/AFSK-SerialMessenger/AFSK-SerialMessenger.ino +++ b/examples/AFSK-SerialMessenger/AFSK-SerialMessenger.ino @@ -1,8 +1,16 @@ -/* Serial glue to send messages over APRS - * - * To do: add message receive code - * - */ +/* Hamshield + * Example: AFSK Serial Messenger + * Serial glue to send messages over APRS. You will need a + * seperate AFSK receiver to test the output of this example. + * Connect the HamShield to your Arduino. Screw the antenna + * into the HamShield RF jack. After uploading this program + * to your adruino, open the Serial Monitor to monitor. Type + * a message under 254 characters into the bar at the top of + * the monitor. Click the "Send" button. Check for output on + * AFSK receiver. + + * NOTE: add message receive code +*/ #define DDS_REFCLK_DEFAULT 9600 diff --git a/examples/AX25Receive/AX25Receive.ino b/examples/AX25Receive/AX25Receive.ino index 7b9cc76..e728e81 100644 --- a/examples/AX25Receive/AX25Receive.ino +++ b/examples/AX25Receive/AX25Receive.ino @@ -37,8 +37,6 @@ void setup() { Serial.print(F(" / ")); Serial.println(radio.getSQLoThresh()); radio.setModeReceive(); - Serial.print(F("RX? ")); - Serial.println(radio.getRX()); Serial.println(F("DDS Start")); delay(100); dds.start(); diff --git a/examples/CrystalCalibration/CrystalCalibration.ino b/examples/CrystalCalibration/CrystalCalibration.ino index 175d5f5..0b9ce48 100644 --- a/examples/CrystalCalibration/CrystalCalibration.ino +++ b/examples/CrystalCalibration/CrystalCalibration.ino @@ -28,7 +28,7 @@ void setup() { radio.initialize(); radio.setRfPower(0); - radio.setFrequency(145050); + radio.frequency(145050); dds.start(); dds.setFrequency(1200); diff --git a/examples/DDS/DDS.ino b/examples/DDS/DDS.ino index cd6146f..9352a4d 100644 --- a/examples/DDS/DDS.ino +++ b/examples/DDS/DDS.ino @@ -1,5 +1,14 @@ -// Example sketch to show how to transmit arbitrary tones. -// In this case, the sketch alternates between 1200Hz and 2200Hz at 1s intervals. +/* Hamshield + * Example: DDS + * This is a simple example to show hot to transmit arbitrary + * tones. In this case, the sketh alternates between 1200Hz + * and 2200Hz at 1s intervals. + * Connect the HamShield to your Arduino. Screw the antenna + * into the HamShield RF jack. Connect the Arduino to wall + * power and then to your computer via USB. Upload this program + * to your Arduino. To test, set a HandyTalkie to 438MHz. You + * should hear two alternating tones. +*/ #define DDS_REFCLK_DEFAULT 9600 #include diff --git a/examples/FMBeacon/FMBeacon.ino b/examples/FMBeacon/FMBeacon.ino index 0398d48..07679f8 100644 --- a/examples/FMBeacon/FMBeacon.ino +++ b/examples/FMBeacon/FMBeacon.ino @@ -1,11 +1,19 @@ -/* -Morse Code Beacon +/* Hamshield + * Example: 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. + * Connect the HamShield to your Arduino. Screw the antenna + * into the HamShield RF jack. Connect the Arduino to wall + * power and then to your computer via USB. After uploading + * this program to your adruino, open the Serial Monitor to + * monitor the status of the beacon. To test, set a HandyTalkie + * to 438MHz. You should hear the message " KC7IBT ARDUINO + * HAMSHIELD" in morse code. -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. + * NOTE: 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. */ #define DDS_REFCLK_DEFAULT 9600 diff --git a/examples/Identifier/Identifier.ino b/examples/FixMe/Identifier/Identifier.ino old mode 100755 new mode 100644 similarity index 100% rename from examples/Identifier/Identifier.ino rename to examples/FixMe/Identifier/Identifier.ino diff --git a/examples/FoxHunt/FoxHunt.ino b/examples/FoxHunt/FoxHunt.ino index 83d3d01..b07ac23 100755 --- a/examples/FoxHunt/FoxHunt.ino +++ b/examples/FoxHunt/FoxHunt.ino @@ -1,4 +1,13 @@ -/* Fox Hunt */ +/* Hamshield + * Example: Fox Hunt + * Plays a one minute tone at 10-13 minute intervals. Script + * will check to see if the channel is clear before it will + * transmit. + * Connect the HamShield to your Arduino. Screw the antenna + * into the HamShield RF jack. Connect the Arduino to wall power and then + * to your computer via USB. To test, set a HandyTalkie + * to 438MHz. You should hear a one-minute tone every 10-13 minutes. +*/ #include diff --git a/examples/FunctionalTest/FunctionalTest.ino b/examples/FunctionalTest/FunctionalTest.ino index 053dc12..063d16c 100644 --- a/examples/FunctionalTest/FunctionalTest.ino +++ b/examples/FunctionalTest/FunctionalTest.ino @@ -1,4 +1,13 @@ -/* HamShield Functional Test */ +/* Hamshield + * Example: Fox Hunt + * Plays a one minute tone at 10-13 minute intervals. Script + * will check to see if the channel is clear before it will + * transmit. + * Connect the HamShield to your Arduino. Screw the antenna + * into the HamShield RF jack. Connect the Arduino to wall power and then + * to your computer via USB. To test, set a HandyTalkie + * to 438MHz. You should hear a one-minute tone every 10-13 minutes. +*/ #include diff --git a/examples/Gauges/Gauges.ino b/examples/Gauges/Gauges.ino index 5226796..e288445 100755 --- a/examples/Gauges/Gauges.ino +++ b/examples/Gauges/Gauges.ino @@ -41,7 +41,7 @@ void setup() { int result = radio.testConnection(); Serial.println(result,DEC); radio.initialize(); - radio.setFrequency(446000); + radio.frequency(446000); radio.setModeReceive(); Serial.println("Entering gauges..."); tone(9,1000); diff --git a/examples/HandyTalkie/HandyTalkie.ino b/examples/HandyTalkie/HandyTalkie.ino index cf19162..952960e 100644 --- a/examples/HandyTalkie/HandyTalkie.ino +++ b/examples/HandyTalkie/HandyTalkie.ino @@ -1,4 +1,20 @@ -// Hamshield +/* Hamshield + * Example: HandyTalkie + * This is a simple example to demonstrate HamShield receive + * and transmit functionality. + * Connect the HamShield to your Arduino. Screw the antenna + * into the HamShield RF jack. Plug a pair of headphones into + * the HamShield. Connect the Arduino to wall power and then + * to your computer via USB. After uploading this program to + * your adruino, open the Serial Monitor. Press the button on + * the HamShield to begin setup. After setup is complete, type + * your desired Tx/Rx frequency, in hertz, into the bar at the + * top of the Serial Monitor and click the "Send" button. + * To test with another HandyTalkie (HT), key up on your HT + * and make sure you can hear it through the headphones + * attached to the HamShield. Key up on the HamShield by + * holding the button. +*/ #include diff --git a/examples/JustTransmit/JustTransmit.ino b/examples/JustTransmit/JustTransmit.ino index fd2c1af..a2d2dbe 100644 --- a/examples/JustTransmit/JustTransmit.ino +++ b/examples/JustTransmit/JustTransmit.ino @@ -28,7 +28,7 @@ void setup() { Serial.println("Setting radio to its defaults.."); radio.initialize(); radio.setRfPower(0); - radio.setChanMode(3); + //radio.setChanMode(3); } void loop() { diff --git a/examples/KISS/KISS.ino b/examples/KISS/KISS.ino index e287b0d..16d7d64 100644 --- a/examples/KISS/KISS.ino +++ b/examples/KISS/KISS.ino @@ -1,3 +1,14 @@ +/* Hamshield + * Example: KISS + * This is a example configures the HamShield to be used as + * a TNC/KISS device. You will need a KISS device to input + * commands to the HamShield + * Connect the HamShield to your Arduino. Screw the antenna + * into the HamShield RF jack. Connect the Arduino to wall + * power and then to your computer via USB. Issue commands + * via the KISS equipment. +*/ + #include #include diff --git a/examples/PSK31Transmit/PSK31Transmit.ino b/examples/PSK31Transmit/PSK31Transmit.ino index 02bcad8..a4bb331 100644 --- a/examples/PSK31Transmit/PSK31Transmit.ino +++ b/examples/PSK31Transmit/PSK31Transmit.ino @@ -1,3 +1,15 @@ +/* Hamshield + * Example: PSK31Transmit + * This is a simple example to demonstrate HamShield PSK31 + * transmit functionality. + * Connect the HamShield to your Arduino. Screw the antenna + * into the HamShield RF jack. Connect the Arduino to wall + * power and then to your computer via USB. After uploading + * this program to your adruino, tune a PSK31 receiver and + * wait to receive the message "Why hello there, friend. + * Nice to meet you. Welcome to PSK31. 73, VE6SLP sk" +*/ + #include #include "varicode.h" diff --git a/examples/Parrot/Parrot.ino b/examples/Parrot/Parrot.ino index abbbc3e..67a210d 100755 --- a/examples/Parrot/Parrot.ino +++ b/examples/Parrot/Parrot.ino @@ -37,7 +37,7 @@ void setup() { // int result = radio.testConnection(); radio.initialize(); - radio.setFrequency(446000); + radio.frequency(446000); setPwmFrequency(9, 1); } diff --git a/examples/QPSK63Transmit/QPSK63Transmit.ino b/examples/QPSK63Transmit/QPSK63Transmit.ino index 2b23909..9517c4a 100644 --- a/examples/QPSK63Transmit/QPSK63Transmit.ino +++ b/examples/QPSK63Transmit/QPSK63Transmit.ino @@ -1,3 +1,15 @@ +/* Hamshield + * Example: QPSK63Transmit + * This is a simple example to demonstrate HamShield QPSK63 + * transmit functionality. + * Connect the HamShield to your Arduino. Screw the antenna + * into the HamShield RF jack. Connect the Arduino to wall + * power and then to your computer via USB. After uploading + * this program to your adruino, tune a QPSK63 receiver and + * wait to receive the message "Why hello there, friend. + * Nice to meet you. Welcome to QPSK63. 73, VE6SLP sk" +*/ + #include #include "varicode.h" diff --git a/examples/SSTV/SSTV.ino b/examples/SSTV/SSTV.ino index 8cda5c3..44ec29e 100755 --- a/examples/SSTV/SSTV.ino +++ b/examples/SSTV/SSTV.ino @@ -1,7 +1,13 @@ -/* - -Sends an SSTV test pattern - +/* Hamshield + * Example: SSTV + * This program will transmit a test pattern. You will need + * SSTV receive equipment to test the output. + * Connect the HamShield to your Arduino. Screw the antenna + * into the HamShield RF jack. Connect the Arduino to wall + * power and then to your computer via USB. After uploading + * this program to your adruino, open the Serial Monitor to + * view the status of the program. Tune your SSTV to + * 446MHz to receive the image output. */ #define PWM_PIN 3 diff --git a/examples/SSTV_M1_Static/SSTV_M1_Static.ino b/examples/SSTV_M1_Static/SSTV_M1_Static.ino index 1618b7b..410b810 100644 --- a/examples/SSTV_M1_Static/SSTV_M1_Static.ino +++ b/examples/SSTV_M1_Static/SSTV_M1_Static.ino @@ -1,3 +1,15 @@ +/* Hamshield + * Example: SSTV M1 Static + * This program will transmit a static image. You will need + * SSTV receive equipment to test the output. + * Connect the HamShield to your Arduino. Screw the antenna + * into the HamShield RF jack. Connect the Arduino to wall + * power and then to your computer via USB. After uploading + * this program to your adruino, open the Serial Monitor to + * view the status of the program. Tune your SSTV to + * 145.5MHz to receive the image output. +*/ + // So the precalculated values will get stored #define DDS_REFCLK_DEFAULT (34965/2) diff --git a/examples/SerialTransceiver/SerialTransceiver.ino b/examples/SerialTransceiver/SerialTransceiver.ino index 530dbee..6403c9e 100644 --- a/examples/SerialTransceiver/SerialTransceiver.ino +++ b/examples/SerialTransceiver/SerialTransceiver.ino @@ -1,6 +1,13 @@ -/* - -SerialTransceiver is TTL Serial port "glue" to allow desktop or laptop control of the HamShield +/* Hamshield + * Example: Serial Tranceiver + * SerialTransceiver is TTL Serial port "glue" to allow + * desktop or laptop control of the HamShield. + * Connect the HamShield to your Arduino. Screw the antenna + * into the HamShield RF jack. Plug a pair of headphones into + * the HamShield. Connect the Arduino to wall power and then + * to your computer via USB. After uploading this program to + * your adruino, open the Serial Monitor. Use the bar at the + * top of the serial monitor to enter commands as seen below. Commands: