Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ktauchathuranga/morse-encoder
Arduino Library for Encoding Data to Morse Code (Audio and Light).
https://github.com/ktauchathuranga/morse-encoder
arduino arduino-library hacktoberfest morse-code morse-code-encoder morsecode
Last synced: about 22 hours ago
JSON representation
Arduino Library for Encoding Data to Morse Code (Audio and Light).
- Host: GitHub
- URL: https://github.com/ktauchathuranga/morse-encoder
- Owner: ktauchathuranga
- License: mit
- Created: 2023-09-07T12:02:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-03T14:17:07.000Z (2 months ago)
- Last Synced: 2025-02-04T12:13:38.734Z (about 22 hours ago)
- Topics: arduino, arduino-library, hacktoberfest, morse-code, morse-code-encoder, morsecode
- Language: C++
- Homepage: https://docs.arduino.cc/libraries/morseencoder/
- Size: 71.3 KB
- Stars: 17
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# **MorseEncoder**
### _Morseencoder is an Arduino library for encoding data to Morse code (Audio and light)._
Introducing the MorseEncoder library, a tool that converts various data types to Morse codes, including **integers, longs, characters, character arrays, and strings.** it can be encoded as [AUDIO](https://github.com/ktauchathuranga/MorseEncoder/blob/main/examples/MorseEncoder_EXAMPLE_AUDIO/MorseEncoder_EXAMPLE_AUDIO.ino) or [LIGHT](https://github.com/ktauchathuranga/MorseEncoder/blob/main/examples/MorseEncoder_EXAMPLE_LIGHT/MorseEncoder_EXAMPLE_LIGHT.ino) by your choice.
##### Currently supported characters[53] : **`ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789.:,;?=/!-_"()$@&+`*****
## Installation1. Go to the [```Releases```](https://github.com/ktauchathuranga/MorseEncoder/releases) Page and download the latest version.
2. Use the Arduino Library Manager to install MorseEncoder.```bash
Sketch -> Include Library -> Add .ZIP Library...
```Also, you can install the library directly from the Library Manager in the IDE.
```
Sketch -> Include Library -> Library Manger... -> Search for - MorseEncoder
```
## Usage```c++
#include "MorseEncoder.h"MorseEncoder morseA(9); // Initialize with the desired pin for Audio **PWM pins only
MorseEncoder morseL(13); // Initialize with the desired pin for Lightvoid setup() {
morseA.beginAudio(15, 500); // [AUDIO] Initialize WPM (word per minute) rate and frequency
morseL.beginLight(15); // [LIGHT] Initialize WPM (word per minute) rate
}void loop() {
String message = "sos";
morseA.print(message); // [AUDIO] Broadcast encoded audio
delay(2000);
morseL.print(message); // [LIGHT] Broadcast encoded light
delay(2000);
}
```
or you can navigate to the Examples section of the Arduino IDE and find the example code there!## Contributing
Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.
Please make sure to update tests as appropriate.
and a big thanks goes to the dev friends in this [Arduino Forum](https://forum.arduino.cc/t/i-need-help-with-my-library/1167276)## License
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)