Use HamShield now, fix refclk rate, increase toggle speed.
This commit is contained in:
parent
ed594d3128
commit
7c67a704c3
|
@ -1,22 +1,31 @@
|
||||||
|
#define DDS_REFCLK_DEFAULT 9600
|
||||||
#include <HamShield.h>
|
#include <HamShield.h>
|
||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
|
|
||||||
|
HamShield radio;
|
||||||
DDS dds;
|
DDS dds;
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
|
Wire.begin();
|
||||||
|
radio.initialize();
|
||||||
|
radio.setRfPower(0);
|
||||||
|
radio.setVHF();
|
||||||
|
radio.setFrequency(145060);
|
||||||
pinMode(2, OUTPUT);
|
pinMode(2, OUTPUT);
|
||||||
pinMode(3, OUTPUT);
|
pinMode(3, OUTPUT);
|
||||||
pinMode(11, OUTPUT);
|
pinMode(11, INPUT);
|
||||||
|
radio.setModeTransmit();
|
||||||
dds.start();
|
dds.start();
|
||||||
dds.playWait(600, 3000);
|
dds.playWait(600, 3000);
|
||||||
dds.on();
|
dds.on();
|
||||||
|
//dds.setAmplitude(31);
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
dds.setFrequency(2200);
|
dds.setFrequency(2200);
|
||||||
delay(5000);
|
delay(1000);
|
||||||
dds.setFrequency(1200);
|
dds.setFrequency(1200);
|
||||||
delay(5000);
|
delay(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DDS_USE_ONLY_TIMER2
|
#ifdef DDS_USE_ONLY_TIMER2
|
||||||
|
|
Loading…
Reference in New Issue