diff --git a/platformio.ini b/platformio.ini index ea23b77..c390c84 100644 --- a/platformio.ini +++ b/platformio.ini @@ -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 \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index cb2e662..26dc609 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,16 +2,23 @@ #include #include -#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;