add comments, update library to Arduino 1.5 standard
This commit is contained in:
		
							parent
							
								
									d98eafb11a
								
							
						
					
					
						commit
						2907eaf02e
					
				| 
						 | 
					@ -1,8 +1,14 @@
 | 
				
			||||||
/* Serial glue to send messages over APRS 
 | 
					/* Hamshield
 | 
				
			||||||
 *  
 | 
					 * Example: AFSK Packet Tester
 | 
				
			||||||
 *  To do: add message receive code
 | 
					 * 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.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define DDS_REFCLK_DEFAULT 9600
 | 
					#define DDS_REFCLK_DEFAULT 9600
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -34,7 +40,7 @@ void setup() {
 | 
				
			||||||
  // turn on pwr to the radio
 | 
					  // turn on pwr to the radio
 | 
				
			||||||
  digitalWrite(RESET_PIN, HIGH);
 | 
					  digitalWrite(RESET_PIN, HIGH);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  Serial.begin(115200);
 | 
					  Serial.begin(9600);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  radio.initialize();
 | 
					  radio.initialize();
 | 
				
			||||||
  radio.frequency(144390);
 | 
					  radio.frequency(144390);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,16 @@
 | 
				
			||||||
/* Serial glue to send messages over APRS 
 | 
					/* Hamshield
 | 
				
			||||||
 *  
 | 
					 * Example: AFSK Serial Messenger
 | 
				
			||||||
 *  To do: add message receive code
 | 
					 * 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
 | 
					#define DDS_REFCLK_DEFAULT 9600
 | 
				
			||||||
| 
						 | 
					@ -35,7 +43,7 @@ void setup() {
 | 
				
			||||||
  // turn on the radio
 | 
					  // turn on the radio
 | 
				
			||||||
  digitalWrite(RESET_PIN, HIGH);
 | 
					  digitalWrite(RESET_PIN, HIGH);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  Serial.begin(115200);
 | 
					  Serial.begin(9600);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  radio.initialize();
 | 
					  radio.initialize();
 | 
				
			||||||
  radio.frequency(145570);
 | 
					  radio.frequency(145570);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,14 @@
 | 
				
			||||||
// Example sketch to show how to transmit arbitrary tones.
 | 
					/* Hamshield
 | 
				
			||||||
// In this case, the sketch alternates between 1200Hz and 2200Hz at 1s intervals.
 | 
					 * 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
 | 
					#define DDS_REFCLK_DEFAULT 9600
 | 
				
			||||||
#include <HamShield.h>
 | 
					#include <HamShield.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,19 @@
 | 
				
			||||||
/* 
 | 
					/* Hamshield
 | 
				
			||||||
Morse Code Beacon
 | 
					 * 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. 
 | 
					 * NOTE: Radio chip audio AGC too slow in responding to tones, 
 | 
				
			||||||
Beacon will check to see if the channel is clear before it will transmit.
 | 
					 * worked around by playing a 6khz tone between actual dits/dahs.
 | 
				
			||||||
 | 
					 * Should work on adjusting AGC to not require this.
 | 
				
			||||||
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.
 | 
					 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define DDS_REFCLK_DEFAULT 9600
 | 
					#define DDS_REFCLK_DEFAULT 9600
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										0
									
								
								examples/Identifier/Identifier.ino → examples/FixMe/Identifier/Identifier.ino
								
								
								
								
									
									
									Executable file → Normal file
								
							
							
						
						
									
										0
									
								
								examples/Identifier/Identifier.ino → examples/FixMe/Identifier/Identifier.ino
								
								
								
								
									
									
									Executable file → Normal file
								
							| 
						 | 
					@ -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 <HamShield.h>
 | 
					#include <HamShield.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,16 @@
 | 
				
			||||||
/* HamShield Functional Test */
 | 
					/* Hamshield
 | 
				
			||||||
 | 
					 * Example: Functional Test
 | 
				
			||||||
 | 
					 * 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. Serial Monitor will 
 | 
				
			||||||
 | 
					 * describe what you should be expecting to hear from your 
 | 
				
			||||||
 | 
					 * headphones. Tune a HandytTalkie to 446MHz to hear morse 
 | 
				
			||||||
 | 
					 * code example.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <HamShield.h>
 | 
					#include <HamShield.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +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 <HamShield.h>
 | 
					#include <HamShield.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// create object for radio
 | 
					// create object for radio
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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 <HamShield.h>
 | 
					#include <HamShield.h>
 | 
				
			||||||
#include <KISS.h>
 | 
					#include <KISS.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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 <HamShield.h>
 | 
					#include <HamShield.h>
 | 
				
			||||||
#include "varicode.h"
 | 
					#include "varicode.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,14 @@
 | 
				
			||||||
 | 
					/* 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 <HamShield.h>
 | 
					#include <HamShield.h>
 | 
				
			||||||
#include "varicode.h"
 | 
					#include "varicode.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -46,7 +57,7 @@ void sendChar(uint8_t c) {
 | 
				
			||||||
  //PORTD &= ~_BV(2); // Diagnostic pin (D2)
 | 
					  //PORTD &= ~_BV(2); // Diagnostic pin (D2)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
char *string = "Why hello there, friend. Nice to meet you. Welcome to PSK31. 73, VE6SLP sk\r\n";
 | 
					char *string = "Why hello there, friend. Nice to meet you. Welcome to QPSK63. 73, VE6SLP sk\r\n";
 | 
				
			||||||
void loop() {
 | 
					void loop() {
 | 
				
			||||||
  int i;
 | 
					  int i;
 | 
				
			||||||
  // put your main code here, to run repeatedly:
 | 
					  // put your main code here, to run repeatedly:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,13 @@
 | 
				
			||||||
/* 
 | 
					/* Hamshield
 | 
				
			||||||
 | 
					 * Example: SSTV
 | 
				
			||||||
Sends an SSTV test pattern 
 | 
					 * 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
 | 
					#define PWM_PIN 3
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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
 | 
					// So the precalculated values will get stored
 | 
				
			||||||
#define DDS_REFCLK_DEFAULT (34965/2)
 | 
					#define DDS_REFCLK_DEFAULT (34965/2)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,13 @@
 | 
				
			||||||
/*
 | 
					/* Hamshield
 | 
				
			||||||
 | 
					 * Example: Serial Tranceiver
 | 
				
			||||||
SerialTransceiver is TTL Serial port "glue" to allow desktop or laptop control of the HamShield
 | 
					 * 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:
 | 
					Commands:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -82,7 +89,7 @@ void setup() {
 | 
				
			||||||
  pinMode(RESET_PIN, OUTPUT);
 | 
					  pinMode(RESET_PIN, OUTPUT);
 | 
				
			||||||
  digitalWrite(RESET_PIN, HIGH);
 | 
					  digitalWrite(RESET_PIN, HIGH);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  Serial.begin(115200);
 | 
					  Serial.begin(9600);
 | 
				
			||||||
  Serial.print(";;;;;;;;;;;;;;;;;;;;;;;;;;");
 | 
					  Serial.print(";;;;;;;;;;;;;;;;;;;;;;;;;;");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  int result = radio.testConnection();
 | 
					  int result = radio.testConnection();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,10 @@
 | 
				
			||||||
 | 
					name=HamShield
 | 
				
			||||||
 | 
					version=1.0.2
 | 
				
			||||||
 | 
					author=Morgan Redfield <morgan@enhancedradio.com>, Casey Halverson <casey@enhancedradio.com>
 | 
				
			||||||
 | 
					maintainer=Morgan Redfield <morgan@enhancedradio.com>
 | 
				
			||||||
 | 
					sentence=A library for use with HamShield by Enhanced Radio Devices.
 | 
				
			||||||
 | 
					paragraph=
 | 
				
			||||||
 | 
					category=Device Control
 | 
				
			||||||
 | 
					url=http://www.hamshield.com
 | 
				
			||||||
 | 
					architectures=*
 | 
				
			||||||
 | 
					includes=HamShield.h
 | 
				
			||||||
		Loading…
	
		Reference in New Issue