From charlesreid1

No edit summary
Line 5: Line 5:
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 <code>#include</code> them.
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 <code>#include</code> them.


=Installing the Library=


==Step 1: Download==
==Step 1: Download==
Line 31: Line 32:


[[Image:Arduinomorse4.png|500px]]
[[Image:Arduinomorse4.png|500px]]
=Using ArduinoMorse=
The following is a very simple sketch, which shows how to send a string with morse code with a fixed WPM speed:
<source lang="C">
#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();
}
</source>


[[Category:Arduino]]
[[Category:Arduino]]
[[Category:Ham Radio]]
[[Category:Ham Radio]]

Revision as of 01:28, 19 July 2015

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.

Arudinomorse1.png

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

Arudinomorse2.png

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

Arudinomorse3.png

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

Arduinomorse4.png

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