Programmer Test

This commit is contained in:
Wolfgang Bachschwell 2020-08-12 17:36:48 +02:00
parent 1d28ce58d9
commit 33001f7c59
2 changed files with 24 additions and 7 deletions

View File

@ -12,3 +12,9 @@
platform = atmelavr platform = atmelavr
board = uno board = uno
framework = arduino framework = arduino
upload_protocol = stk500v2
; each flag in a new line
upload_flags =
-Pusb
upload_port = usb

View File

@ -2,16 +2,23 @@
#include <SoftwareSerial.h> #include <SoftwareSerial.h>
#include <FT817_NBS.h> #include <FT817_NBS.h>
#define SET_FREQ 4 #define SET_FREQ A4
#define SWITCH_AB 5 #define SWITCH_AB A5
#define SWITCH_USB_CW 7 #define SWITCH_USB_CW A3
#define INIT 9 #define INIT A1
#define LOWER_FREQ_BEACON 6 #define LOWER_FREQ_BEACON A0
#define HIGHER_FREQ_BEACON 8 #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); SoftwareSerial radio = SoftwareSerial(2, 3);
FT817_NBS ft817(&radio); FT817_NBS ft817(&radio);
void setFreq(); void setFreq();
void switchUsbCw(); void switchUsbCw();
void initRadio(); void initRadio();
@ -28,6 +35,10 @@ void setup() {
pinMode(INIT, INPUT_PULLUP); pinMode(INIT, INPUT_PULLUP);
pinMode(HIGHER_FREQ_BEACON, INPUT_PULLUP); pinMode(HIGHER_FREQ_BEACON, INPUT_PULLUP);
pinMode(LOWER_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; bool pressBlockSetFreq = false;