updating files for HS09
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/* Fox Hunt */
|
||||
|
||||
#include <HAMShield.h>
|
||||
#include <Wire.h>
|
||||
#include <HamShield.h>
|
||||
//#include <Wire.h>
|
||||
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
@@ -13,7 +13,7 @@
|
||||
#define INTERVAL 10
|
||||
#define RANDOMCHANCE 3
|
||||
|
||||
HAMShield radio;
|
||||
HamShield radio;
|
||||
|
||||
void setup() {
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
@@ -27,15 +27,15 @@ void setup() {
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
Wire.begin();
|
||||
//Wire.begin();
|
||||
radio.initialize();
|
||||
radio.setFrequency(145510);
|
||||
radio.frequency(145510);
|
||||
radio.setModeReceive();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
waitMinute(INTERVAL + random(0,RANDOMCHANCE)); // wait before transmitting, randomly up to 3 minutes later
|
||||
if(radio.waitForChannel(30000,2000)) { // wait for a clear channel, abort after 30 seconds, wait 2 seconds of dead air for breakers
|
||||
if(radio.waitForChannel(30000,2000, -90)) { // wait for a clear channel, abort after 30 seconds, wait 2 seconds of dead air for breakers
|
||||
radio.setModeTransmit(); // turn on transmit mode
|
||||
tone(1000,11,TRANSMITLENGTH * 60 * 1000); // play a long solid tone
|
||||
radio.morseOut("1ZZ9ZZ/B FOXHUNT"); // identify the fox hunt transmitter
|
||||
@@ -49,4 +49,3 @@ void waitMinute(int period) {
|
||||
delay(period * 60 * 1000);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user