Programmer Test
This commit is contained in:
parent
1d28ce58d9
commit
33001f7c59
@ -12,3 +12,9 @@
|
||||
platform = atmelavr
|
||||
board = uno
|
||||
framework = arduino
|
||||
|
||||
upload_protocol = stk500v2
|
||||
; each flag in a new line
|
||||
upload_flags =
|
||||
-Pusb
|
||||
upload_port = usb
|
25
src/main.cpp
25
src/main.cpp
@ -2,16 +2,23 @@
|
||||
#include <SoftwareSerial.h>
|
||||
#include <FT817_NBS.h>
|
||||
|
||||
#define SET_FREQ 4
|
||||
#define SWITCH_AB 5
|
||||
#define SWITCH_USB_CW 7
|
||||
#define INIT 9
|
||||
#define LOWER_FREQ_BEACON 6
|
||||
#define HIGHER_FREQ_BEACON 8
|
||||
#define SET_FREQ A4
|
||||
#define SWITCH_AB A5
|
||||
#define SWITCH_USB_CW A3
|
||||
#define INIT A1
|
||||
#define LOWER_FREQ_BEACON A0
|
||||
#define HIGHER_FREQ_BEACON A2
|
||||
|
||||
#define LED_LOWER_FREQ_BEACON 5
|
||||
#define LED_INIT 6
|
||||
#define LED_HIGHER_FREQ_BEACON 7
|
||||
#define LED_SWITCH_USB_CW 8
|
||||
#define LED_SET_FREQ 9
|
||||
#define LED_SWITCH_AB 10
|
||||
|
||||
|
||||
SoftwareSerial radio = SoftwareSerial(2, 3);
|
||||
FT817_NBS ft817(&radio);
|
||||
|
||||
void setFreq();
|
||||
void switchUsbCw();
|
||||
void initRadio();
|
||||
@ -28,6 +35,10 @@ void setup() {
|
||||
pinMode(INIT, INPUT_PULLUP);
|
||||
pinMode(HIGHER_FREQ_BEACON, INPUT_PULLUP);
|
||||
pinMode(LOWER_FREQ_BEACON, INPUT_PULLUP);
|
||||
pinMode(LED_INIT, OUTPUT);
|
||||
digitalWrite(LED_INIT,HIGH);
|
||||
delay (500);
|
||||
digitalWrite(LED_INIT, LOW);
|
||||
}
|
||||
|
||||
bool pressBlockSetFreq = false;
|
||||
|
Loading…
Reference in New Issue
Block a user