Find a Morse library that actually works.

This commit is contained in:
mattbk 2023-08-29 20:24:17 -05:00
parent e573c1ed1b
commit 7f4c8c001e
2 changed files with 30 additions and 23 deletions

View File

@ -17,3 +17,4 @@ lib_deps =
me-no-dev/AsyncTCP@^1.1.1 me-no-dev/AsyncTCP@^1.1.1
me-no-dev/ESP Async WebServer@^1.2.3 me-no-dev/ESP Async WebServer@^1.2.3
contrem/arduino-timer@^3.0.1 contrem/arduino-timer@^3.0.1
kj7rrv/Telegraph@^1.0.0

View File

@ -17,6 +17,7 @@
#include <SPIFFS.h> #include <SPIFFS.h>
#include <Preferences.h> #include <Preferences.h>
#include <arduino-timer.h> #include <arduino-timer.h>
#include <Telegraph.h>
// download zip from https://github.com/me-no-dev/ESPAsyncWebServer and install. // download zip from https://github.com/me-no-dev/ESPAsyncWebServer and install.
#include <ESPAsyncWebServer.h> #include <ESPAsyncWebServer.h>
@ -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) // setup(): stuff that only gets done once, after power up (KB1OIQ's description)
//================================================================================ //================================================================================
@ -285,36 +293,34 @@ void setup() {
server.onNotFound(notFound); server.onNotFound(notFound);
server.begin(); server.begin();
telegraph.send("CQ CQ CQ");
// Try to send "K" on startup? What about spaces? Don't use delay();
k();
} }
void loop() { void loop() {
// Timers // Timers
time_until_start.tick(); time_until_start.tick();
timer.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 String yourInputString = readFile(SPIFFS, "/inputString.txt");
// if (yourInputInt > 0) { int yourInputInt = readFile(SPIFFS, "/inputInt.txt").toInt();
// Serial.println("GPIO 26 on"); // float yourInputFloat = readFile(SPIFFS, "/inputFloat.txt").toFloat();
// 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";
// }
// 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 // // To access your stored values on inputString, inputInt, inputFloat