Added some additional comments to FMBeacon example sketch.
This commit is contained in:
		
							parent
							
								
									daa4befe2c
								
							
						
					
					
						commit
						e73f67429d
					
				| 
						 | 
					@ -1,5 +1,6 @@
 | 
				
			||||||
/* Hamshield
 | 
					/* Hamshield
 | 
				
			||||||
 * Example: Morse Code Beacon
 | 
					 * Example: Morse Code Beacon
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 * Test beacon will transmit and wait 30 seconds. 
 | 
					 * Test beacon will transmit and wait 30 seconds. 
 | 
				
			||||||
 * Beacon will check to see if the channel is clear before it 
 | 
					 * Beacon will check to see if the channel is clear before it 
 | 
				
			||||||
 * will transmit.
 | 
					 * will transmit.
 | 
				
			||||||
| 
						 | 
					@ -8,12 +9,8 @@
 | 
				
			||||||
 * power and then to your computer via USB. After uploading 
 | 
					 * power and then to your computer via USB. After uploading 
 | 
				
			||||||
 * this program to your Arduino, open the Serial Monitor to 
 | 
					 * this program to your Arduino, open the Serial Monitor to 
 | 
				
			||||||
 * monitor the status of the beacon. To test, set a HandyTalkie 
 | 
					 * monitor the status of the beacon. To test, set a HandyTalkie 
 | 
				
			||||||
 * to 438MHz. You should hear the message " KC7IBT HAMSHIELD"
 | 
					 * to 438MHz. You should hear the message " CALLSIGN HAMSHIELD" 
 | 
				
			||||||
 * in morse code.
 | 
					 * in morse code.
 | 
				
			||||||
 | 
					 | 
				
			||||||
 * 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
 | 
					#define DDS_REFCLK_DEFAULT 9600
 | 
				
			||||||
| 
						 | 
					@ -51,12 +48,15 @@ void setup() {
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  // Tell the HamShield to start up
 | 
					  // Tell the HamShield to start up
 | 
				
			||||||
  radio.initialize();
 | 
					  radio.initialize();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Set the transmit power level (0-8)
 | 
				
			||||||
  radio.setRfPower(0);
 | 
					  radio.setRfPower(0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Set the morse code characteristics
 | 
				
			||||||
  radio.setMorseFreq(600);
 | 
					  radio.setMorseFreq(600);
 | 
				
			||||||
  radio.setMorseDotMillis(100);
 | 
					  radio.setMorseDotMillis(100);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Configure the HamShield to transmit and recieve on 446.000MHz
 | 
					  // Configure the HamShield to operate on 438.000MHz
 | 
				
			||||||
  radio.frequency(438000);
 | 
					  radio.frequency(438000);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  Serial.println("Radio Configured.");
 | 
					  Serial.println("Radio Configured.");
 | 
				
			||||||
| 
						 | 
					@ -74,7 +74,7 @@ void loop() {
 | 
				
			||||||
    radio.setModeTransmit();
 | 
					    radio.setModeTransmit();
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    // Send a message out in morse code
 | 
					    // Send a message out in morse code
 | 
				
			||||||
    radio.morseOut(" KC7IBT HAMSHIELD");
 | 
					    radio.morseOut(" CALLSIGN HAMSHIELD");
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    // We're done sending the message, set the radio back into recieve mode.
 | 
					    // We're done sending the message, set the radio back into recieve mode.
 | 
				
			||||||
    radio.setModeReceive();
 | 
					    radio.setModeReceive();
 | 
				
			||||||
| 
						 | 
					@ -85,6 +85,6 @@ void loop() {
 | 
				
			||||||
    Serial.println(radio.readRSSI());
 | 
					    Serial.println(radio.readRSSI());
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Wait 10 seconds before we send our beacon again.
 | 
					  // Wait 30 seconds before we send our beacon again.
 | 
				
			||||||
  delay(30000);
 | 
					  delay(30000);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue