From charlesreid1

This page walks you through the installation of the Arduinomorse library from Github user Mark Fickett.

Setup

Download

The first step is to download the Arduinomorse library from GitHub: https://github.com/markfickett/arduinomorse

Create Zip File for Arduino

For more information on installing libraries for use in the Arduino Development Environment generally: Arduino Installing Libraries

Assuming you aren't modifying the Arduinomorse library, or assuming you've finished with your modifications, you will zip up the resulting Arduinomorse folder (that contains your copy of the git repository) into a zip file, arduinomorse.zip. What's important is that the zip file contain a folder, and that the folder contain the arduinomorse.h header, which we're including in our sketch.

Loading Library in Arduino Development Environment

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.

Open your Arduino development environment, and pick Sketch > Include Library.

Arduinomorse1.png

Now we pick the zip file to add to Arduino's list of libraries:

Arduinomorse2.png

Finally, it should show up in the external libraries menu, at the very bottom:

Arduinomorse3.png

When you select the ArduinoMorse library, it will add a #include <morse.h> to your header:

Arduinomorse4.png

Usage

Simple Arduino Sketch

The following is a very simple sketch, which sends a string with morse code with a fixed WPM speed. It is a non-blocking morse code message. Note that this github issue indicates you could use blocking sending for such a trivial example.

#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();
}

Flags