From 7a07bd3056f971e52450f9ad4416cd679bf1caa4 Mon Sep 17 00:00:00 2001 From: nick6x Date: Sat, 13 Aug 2016 19:25:46 -0700 Subject: [PATCH] Add comments, some standardizing --- examples/AX25Receive/AX25Receive.ino | 14 +++++++++++ .../CrystalCalibration/CrystalCalibration.ino | 12 +++++++++ examples/Gauges/Gauges.ino | 25 +++++++++++++------ examples/HAMBot/HAMBot.ino | 16 +++++++++++- examples/HandyTalkie/HandyTalkie.ino | 1 + examples/JustTransmit/JustTransmit.ino | 15 +++++++++-- examples/Parrot/Parrot.ino | 18 ++++++++----- examples/SSTV/SSTV.ino | 2 +- examples/SSTV_M1_Static/SSTV_M1_Static.ino | 2 +- examples/SignalTest/SignalTest.ino | 22 +++++++++++----- 10 files changed, 102 insertions(+), 25 deletions(-) diff --git a/examples/AX25Receive/AX25Receive.ino b/examples/AX25Receive/AX25Receive.ino index a2ac961..f06332d 100644 --- a/examples/AX25Receive/AX25Receive.ino +++ b/examples/AX25Receive/AX25Receive.ino @@ -1,3 +1,17 @@ +/* Hamshield + * Example: AX25 Receive + * This example receives AFSK test data. You will need seperate + * AFSK equipment to send data for this example. + * 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 so you will see the AFSK + * packet. Send AFSK packet from AFSK equipment at 145.01MHz. + + * Note: add message receive code + */ + #include #define PWM_PIN 3 diff --git a/examples/CrystalCalibration/CrystalCalibration.ino b/examples/CrystalCalibration/CrystalCalibration.ino index 0b9ce48..4a2d4c6 100644 --- a/examples/CrystalCalibration/CrystalCalibration.ino +++ b/examples/CrystalCalibration/CrystalCalibration.ino @@ -1,3 +1,15 @@ +/* Hamshield + * Example: Crystal Calibration + * This example allows you to calibrate the crystal clock + * through the Arduino Serial Monitor. + * 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. + * Type 'h' into the bar at the top of the Serial Monitor + * and click the "Send" button for more instructions. +*/ + #define DDS_REFCLK_DEFAULT 38400 #define DDS_REFCLK_OFFSET 0 #define DDS_DEBUG_SERIAL diff --git a/examples/Gauges/Gauges.ino b/examples/Gauges/Gauges.ino index e288445..4020571 100755 --- a/examples/Gauges/Gauges.ino +++ b/examples/Gauges/Gauges.ino @@ -1,10 +1,19 @@ -/* - -Gauges - -Simple gauges for the radio receiver. - - +/* Hamshield + * Example: Gauges + * This example prints Signal, Audio In, and Audio Rx ADC + * Peak strength to the Serial Monitor in a graphical manner. + * 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. You will see a + * repeating display of different signal strengths. Ex: + * + * [....|....] -73 + * Signal + * + * Uncheck the "Autoscroll" box at the bottom of the Serial + * Monitor to manually control the view of the Serial Monitor. */ #include @@ -35,7 +44,7 @@ void setup() { digitalWrite(RESET_PIN, HIGH); analogReference(DEFAULT); - Serial.begin(115200); + Serial.begin(9600); Serial.print("Radio status: "); int result = radio.testConnection(); diff --git a/examples/HAMBot/HAMBot.ino b/examples/HAMBot/HAMBot.ino index 1acdd3c..40b0c81 100755 --- a/examples/HAMBot/HAMBot.ino +++ b/examples/HAMBot/HAMBot.ino @@ -1,4 +1,18 @@ -/* Simple DTMF controlled HAM Radio Robot */ +/* Hamshield + * Example: HAMBot + * Simple DTMF controlled HAM Radio Robot. You will need + * seperate DTMF equipment as well as robot for 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, you can send commands from + * your DTMF equipment using the following list: + * '4' => turn robot left + * '6' => turn robot right + * '2' => move robot forward + * '5' => tell robot to send morse code identity +/* #include // include the robot library #include diff --git a/examples/HandyTalkie/HandyTalkie.ino b/examples/HandyTalkie/HandyTalkie.ino index e6d2eb5..952960e 100644 --- a/examples/HandyTalkie/HandyTalkie.ino +++ b/examples/HandyTalkie/HandyTalkie.ino @@ -15,6 +15,7 @@ * attached to the HamShield. Key up on the HamShield by * holding the button. */ + #include // create object for radio diff --git a/examples/JustTransmit/JustTransmit.ino b/examples/JustTransmit/JustTransmit.ino index a2d2dbe..757a748 100644 --- a/examples/JustTransmit/JustTransmit.ino +++ b/examples/JustTransmit/JustTransmit.ino @@ -1,4 +1,15 @@ -/* Just Transmit */ +/* Hamshield + * Example: Just Transmit + * This example continuously transmits. + * Connect the HamShield to your Arduino. Screw the antenna + * into the HamShield RF jack. Plug a pair of headphones with + * built-in mic 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 to monitor the program's progress. After setup is + * complete, tune a HandyTalkie (HT) to 144.025MHz. Listen on + * the HT for the HamShield broadcasting from the mic. +*/ #include @@ -33,7 +44,7 @@ void setup() { void loop() { radio.bypassPreDeEmph(); - radio.frequency(144000); + radio.frequency(144025); // radio.setTxSourceNone(); radio.setModeTransmit(); for(;;) { } diff --git a/examples/Parrot/Parrot.ino b/examples/Parrot/Parrot.ino index 67a210d..ac75451 100755 --- a/examples/Parrot/Parrot.ino +++ b/examples/Parrot/Parrot.ino @@ -1,9 +1,15 @@ -/* - -Record sound and then plays it back a few times. -Very low sound quality @ 2KHz 0.75 seconds -A bit robotic and weird - +/* Hamshield + * Example: Parrot + * Record sound and then plays it back a few times. Very low + * sound quality @ 2KHz 0.75 seconds. A bit robotic and weird. + * You will need a HandyTalkie (HT) to test the output of this + * example. + * Connect the HamShield to your Arduino. Screw the antenna + * into the HamShield RF jack. Plug a pair of headphones with + * built-in mic into the HamShield. Connect the Arduino to + * wall power and then to your computer via USB. To test the + * output, tune you HT to 446MHz. Recording should be repeated + * ten times. */ #include diff --git a/examples/SSTV/SSTV.ino b/examples/SSTV/SSTV.ino index e28e81c..c5959e3 100755 --- a/examples/SSTV/SSTV.ino +++ b/examples/SSTV/SSTV.ino @@ -1,7 +1,7 @@ /* Hamshield * Example: SSTV * This program will transmit a test pattern. You will need - * SSTV receive equipment to test the output. + * SSTV 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 diff --git a/examples/SSTV_M1_Static/SSTV_M1_Static.ino b/examples/SSTV_M1_Static/SSTV_M1_Static.ino index 410b810..4082aa8 100644 --- a/examples/SSTV_M1_Static/SSTV_M1_Static.ino +++ b/examples/SSTV_M1_Static/SSTV_M1_Static.ino @@ -1,7 +1,7 @@ /* Hamshield * Example: SSTV M1 Static * This program will transmit a static image. You will need - * SSTV receive equipment to test the output. + * SSTV 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 diff --git a/examples/SignalTest/SignalTest.ino b/examples/SignalTest/SignalTest.ino index 454359b..2f849ca 100755 --- a/examples/SignalTest/SignalTest.ino +++ b/examples/SignalTest/SignalTest.ino @@ -1,9 +1,19 @@ -/* - -Plays back the current signal strength level and morses out it's call sign at the end. - - -*/ +/* Hamshield + * Example: Signal Test + * Plays back the current signal strength level and morses out + * it's call sign at the end. You will need a HandyTalkie (HT) + * to test the output of this example. + * 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. HamShield will print + * the results of its signal test to the Serial Monitor. To + * test with another HandyTalkie (HT), tune in to 446MHz and + * listen for the call sign. Then key up on your HT and make + * sure you can hear it through the headphones attached to the + * HamShield. +*/ #define DOT 100 #define CALLSIGN "1ZZ9ZZ/B"