kopia lustrzana https://github.com/g7uhn/ft817_buddy
added new software serial port
rodzic
a170e77992
commit
1620041000
|
@ -8,14 +8,12 @@
|
|||
; Please visit documentation for the other options and examples
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
; [env:pro16MHzatmega328]
|
||||
[env:nanoatmega328]
|
||||
platform = atmelavr
|
||||
; board = pro16MHzatmega328
|
||||
board = nanoatmega328
|
||||
framework = arduino
|
||||
lib_deps =
|
||||
adafruit/Adafruit GFX Library @ ^1.10.1
|
||||
adafruit/Adafruit PCD8544 Nokia 5110 LCD library @ ^1.2.0
|
||||
adafruit/Adafruit BusIO @ ^1.5.0
|
||||
slashdevin/NeoSWSerial@^3.0.5
|
||||
featherfly/SoftwareSerial@^1.0
|
||||
|
|
|
@ -33,12 +33,16 @@
|
|||
#include <Adafruit_PCD8544.h>
|
||||
#include <Adafruit_GFX.h>
|
||||
#include <Adafruit_I2CDevice.h>
|
||||
#include <SoftwareSerial.h>
|
||||
#include <ft817.h>
|
||||
|
||||
// Declarations
|
||||
Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3); // pins for (CLK,DIN,D/C,CE,RST)
|
||||
FT817 radio; // define “radio” so that we may pass CAT and EEPROM commands
|
||||
|
||||
// Expansion software serial port: TX = digital pin 12, RX = digital pin 11
|
||||
SoftwareSerial expansion(12,11);
|
||||
|
||||
// Define PCB pins
|
||||
#define backlightPin 8 // backlight output pin (not the "LIGHT" input button!)
|
||||
#define buttonPin A0 // SW1-SW6 arrive as different levels on analog input A0
|
||||
|
@ -177,7 +181,10 @@ boolean page2SoftkeyStatus6() {}
|
|||
void setup(void)
|
||||
{
|
||||
// Start serial
|
||||
radio.begin(38400); // start the serial port for the CAT library
|
||||
radio.begin(38400); // start the serial port for the CAT library
|
||||
|
||||
// Start expansion software serial
|
||||
expansion.begin(115200); // start the expansion serial port at 115200 baud for GPS module
|
||||
|
||||
// Set up some pins
|
||||
pinMode(backlightPin, OUTPUT);
|
||||
|
|
Ładowanie…
Reference in New Issue