updated for HS05

This commit is contained in:
morgan
2015-11-23 08:54:10 -08:00
parent a196501f15
commit 807617de83
24 changed files with 513 additions and 203 deletions

View File

@@ -6,11 +6,16 @@ Arduino audio overlay example
*/
#include <HAMShield.h>
#include <Wire.h>
#define DOT 100
#define PWM_PIN 3
#define RESET_PIN A3
#define SWITCH_PIN 2
HAMShield radio;
const char *bascii = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,?'!/()&:;=+-_\"$@",
@@ -21,7 +26,18 @@ const char *callsign = {"1ZZ9ZZ/B"} ;
char morsebuffer[8];
void setup() {
void setup() {
// NOTE: if not using PWM out, it should be held low to avoid tx noise
pinMode(PWM_PIN, OUTPUT);
digitalWrite(PWM_PIN, LOW);
// prep the switch
pinMode(SWITCH_PIN, INPUT_PULLUP);
// set up the reset control pin
pinMode(RESET_PIN, OUTPUT);
digitalWrite(RESET_PIN, HIGH);
Serial.begin(9600);
Serial.println("starting up..");
Wire.begin();
@@ -29,7 +45,7 @@ void setup() {
int result = radio.testConnection();
Serial.println(result,DEC);
radio.initialize();
radio.setFrequency(446000);
radio.frequency(446000);
radio.setVolume1(0xF);
radio.setVolume2(0xF);
radio.setModeReceive();