Arduino/Arduinomorse Library
From charlesreid1
The first step is to download the arduinomorse library from GitHub: https://github.com/markfickett/arduinomorse
The second step is to zip up the resulting folder into a zip file, arduinomorse.zip.
The third step is to load this as a library in the Arduino development environment, which will add the relevant header files to somewhere where Arduino will find them when you #include them.
Installing the Library
Step 1: Download
Download the arduinomorse repo by either cloning a copy (if you don't plan on modifying it) or forking a copy (if you do plan to modify it).
Step 2: Zip up the resulting folder
I used Mac to do this, I right-clicked on the arudinomorse/ directory that was created with my git clone command above, and picked "compress". This creates a zip file arduinomorse.zip that you can feed to the Arduino Development Environment.
Step 3: Add arduinomorse library to Arduino Development Environment
Open your Arduino development environment, and pick Sketch > Include Library.
Now we pick the zip file to add to Arduino's list of libraries:
Finally, it should show up in the external libraries menu, at the very bottom:
When you select the ArduinoMorse library, it will add a #include <morse.h> to your header:
Using ArduinoMorse
The following is a very simple sketch, which shows how to send a string with morse code with a fixed WPM speed:
#include <morse.h>
#define PIN_STATUS 13
LEDMorseSender sender(PIN_STATUS);
void setup() {
sender.setup();
sender.setWPM(40);
sender.setMessage(String("this is the longest string in the known universe"));
sender.startSending();
}
void loop() {
sender.continueSending();
}