-
Notifications
You must be signed in to change notification settings - Fork 0
/
MorseLib.h
38 lines (30 loc) · 1.04 KB
/
MorseLib.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
MorseLib version 1.2.4
Author: Franciszek Myslek [frm20]
Module: CS12020 - Introduction to Programming
This library helps you with morse code decoding and encoding
as well as with sending morse code without blocking other processes.
For usage instructions please see the built-in examples.
*/
#ifndef MORSELIBC_H
#define MORSELIBC_H
// main Arduino library
#include <Arduino.h>
// every port info
struct port {
String name; // name of the port
int pin;
bool mode; // INPUT / OUTPUT
String source; // "DIGITAL", "ANALOG", "SERIAL"
bool handleMorse; // handle signal input (true) or String text(false)
bool state; // if should send
int frequency; // frequency for analog signals
};
// code that decodes and endcodes strings and characters from and to morse code
#include "utility/MorseAlgorithms.h"
// code that handles digital and analog sending as well as non-blocking digital
// sending
#include "utility/MorseOutput.h"
// code that handles morse code input from digital pin (button, etc)
#include "utility/MorseInput.h"
#endif