From 7f4c8c001ef8b926d63ede435c3c205ee4828238 Mon Sep 17 00:00:00 2001 From: mattbk Date: Tue, 29 Aug 2023 20:24:17 -0500 Subject: [PATCH] Find a Morse library that actually works. --- vulpes/platformio.ini | 1 + vulpes/src/main.cpp | 52 ++++++++++++++++++++++++------------------- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/vulpes/platformio.ini b/vulpes/platformio.ini index ed7a903..0b3a327 100644 --- a/vulpes/platformio.ini +++ b/vulpes/platformio.ini @@ -17,3 +17,4 @@ lib_deps = me-no-dev/AsyncTCP@^1.1.1 me-no-dev/ESP Async WebServer@^1.2.3 contrem/arduino-timer@^3.0.1 + kj7rrv/Telegraph@^1.0.0 diff --git a/vulpes/src/main.cpp b/vulpes/src/main.cpp index a5966d0..fb619eb 100644 --- a/vulpes/src/main.cpp +++ b/vulpes/src/main.cpp @@ -17,6 +17,7 @@ #include #include #include +#include // download zip from https://github.com/me-no-dev/ESPAsyncWebServer and install. #include @@ -200,6 +201,13 @@ void k(){ // ^^^^ +Telegraph telegraph(LED_BUILTIN, 10, HIGH); + + + + + + //================================================================================ // setup(): stuff that only gets done once, after power up (KB1OIQ's description) //================================================================================ @@ -285,38 +293,36 @@ void setup() { server.onNotFound(notFound); server.begin(); - - // Try to send "K" on startup? What about spaces? Don't use delay(); - k(); + telegraph.send("CQ CQ CQ"); } void loop() { // Timers - time_until_start.tick(); - timer.tick(); + time_until_start.tick(); + timer.tick(); - String yourInputString = readFile(SPIFFS, "/inputString.txt"); - // int yourInputInt = readFile(SPIFFS, "/inputInt.txt").toInt(); - // float yourInputFloat = readFile(SPIFFS, "/inputFloat.txt").toFloat(); - // Blink LED according to seconds entered - // if (yourInputInt > 0) { - // Serial.println("GPIO 26 on"); - // output26State = "on"; - // digitalWrite(output26, HIGH); - // delay(yourInputInt * 1000); - // Serial.println(yourInputInt); - // Serial.println("GPIO 26 off"); - // output26State = "off"; - // digitalWrite(output26, LOW); - // delay(yourInputInt * 1000); - // } else { - // output26State = "off"; - // } + String yourInputString = readFile(SPIFFS, "/inputString.txt"); + int yourInputInt = readFile(SPIFFS, "/inputInt.txt").toInt(); + // float yourInputFloat = readFile(SPIFFS, "/inputFloat.txt").toFloat(); - + // Blink LED according to seconds entered + // if (yourInputInt > 0) { + // Serial.println("GPIO 26 on"); + // output26State = "on"; + // digitalWrite(output26, HIGH); + // delay(yourInputInt * 1000); + // Serial.println(yourInputInt); + // Serial.println("GPIO 26 off"); + // output26State = "off"; + // digitalWrite(output26, LOW); + // delay(yourInputInt * 1000); + // } else { + // output26State = "off"; + // } + // // To access your stored values on inputString, inputInt, inputFloat // String yourInputString = readFile(SPIFFS, "/inputString.txt"); // Serial.print("*** Your inputString: ");