EasyManuals Logo

Arduino uno User Manual

Arduino uno
311 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #87 background imageLoading...
Page #87 background image
Figure 14Find the sketchbook location in the Preferences.
TelegraphLibrary/examples/HelloWorld/HelloWorld.ino
#include "telegraph.h"
const unsigned int BAUD_RATE = 9600;
const unsigned int OUTPUT_PIN = 13;
const unsigned int DIT_LENGTH = 200;
Telegraph telegraph(OUTPUT_PIN, DIT_LENGTH);
void setup() {
Serial.begin(BAUD_RATE);
}
void loop() {
telegraph.send_message("Hello, world!");
delay(5000);
}
This sketch emits the string Hello, world! as Morse code every five seconds.
To achieve this, we include the definition of our
Telegraph
class, and we define
constants for the pin our LED is connected to and for the length of our dits.
Then we create a global
Telegraph
object and an empty
setup
function. In
loop
,
we then invoke
send_message
on our
Telegraph
instance every five seconds.
When you compile this sketch, the Arduino IDE automatically compiles the
telegraph library, too. If you forgot to copy the library files to the
libraries/Telegraph
folder, youll get an error message such as Telegraph does not name a type.
Chapter 4. Building a Morse Code Generator Library 68
report erratum discuss
www.it-ebooks.info

Table of Contents

Other manuals for Arduino uno

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Arduino uno and is the answer not in the manual?

Arduino uno Specifications

General IconGeneral
Form factorArduino
CertificationRoHS, FC, CE
Processor model-
Processor frequency- MHz
Microcontroller modelATmega328
Microcontroller frequency16 MHz
DC input voltage7-12 V
Operating voltage5 V
DC current per I/O pin40 mA
Flash memory0.032 MB
Maximum internal memory- GB
SRAM (Static Random Access Memory)2 KB
EEPROM (Electrically Erasable Programmable Read-Only Memory)1 KB
Wi-FiNo
Number of analog I/O pins6
Number of digital I/O pins14
Weight and Dimensions IconWeight and Dimensions
Board dimensions53.4 x 68.6 mm

Related product manuals