From charlesreid1

No edit summary
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
The first step is to download the arduinomorse library from GitHub: https://github.com/markfickett/arduinomorse
This page walks you through the installation of the [https://github.com/markfickett/arduinomorse Arduinomorse] library from Github user [https://github.com/markfickett/ Mark Fickett].


The second step is to zip up the resulting folder into a zip file, arduinomorse.zip.
=Setup=


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.
==Download==


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


==Step 1: Download==
==Create Zip File for Arduino==


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).
For more information on installing libraries for use in the Arduino Development Environment generally: [[Arduino Installing Libraries]]


==Step 2: Zip up the resulting folder==
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.


I used Mac to do this, I right-clicked on the <code>arudinomorse/</code> 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.
==Loading Library in Arduino Development Environment==


==Step 3: Add arduinomorse library to 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 <code>#include</code> them.


[[Image:Arudinomorse1.png|500px]]
Open your Arduino development environment, and pick Sketch > Include Library.
 
[[Image:Arduinomorse1.png|500px]]


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


[[Image:Arudinomorse2.png|500px]]
[[Image:Arduinomorse2.png|500px]]


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


[[Image:Arudinomorse3.png|500px]]
[[Image:Arduinomorse3.png|500px]]


When you select the ArduinoMorse library, it will add a <code>#include <morse.h></code> to your header:
When you select the ArduinoMorse library, it will add a <code>#include <morse.h></code> to your header:
Line 30: Line 33:
[[Image:Arduinomorse4.png|500px]]
[[Image:Arduinomorse4.png|500px]]


[[Category:Arduino]]
=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 [https://github.com/markfickett/arduinomorse/issues/3 this github issue] indicates you could use blocking sending for such a trivial example.
 
<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>
 
=Flags=
 
{{ArduinoFlag}}
 
{{RadioFlag}}
 
[[Category:Ham Radio]]
[[Category:Ham Radio]]

Latest revision as of 00:32, 21 June 2016

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