EasyManuals Logo

Arduino uno User Guide

Arduino uno
27 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 #14 background imageLoading...
Page #14 background image
14
The set of valid instructions comes from the particular programming language used. There are
many languages, including C, C++, Java, Ada, Lisp, Fortran, Basic, Pascal, Perl, and a thousand
others. The Arduino uses a simplified variation of the C programming language.
For any programming language, the instructions must be entered in a specific syntax in order for
the computer to interpret them properly. Typically, the interpretation is a two step process. A
compiler takes the language specific text you enter for the program and converts it into a
machine readable form that is downloaded into the processor. When the program executes, the
processor executes the machine code line by line.
6.1 Basics of Programming Languages
All sequential programming languages have four categories of instructions. First are operation
commands that evaluate an expression, perform arithmetic, toggle states of I/O lines, and many
other operations. Second are jump commands that cause the program to jump immediately to
another part of the program that is tagged with a label. Jumps are one way to break out of the
normal line-by-line processing mode. For example, if you want a program to repeat over and
over without stopping, have the last line of the program be a jump command that takes the
program back to its first line. Third are branch commands that evaluate a condition and jump if
the condition is true. For example, you might want to jump only if a number is greater than zero.
Or, you might want to jump only if the state of an i/o line is low. Fourth are loop commands that
repeat a section of code a specified number of times. For example, with a loop you can have a
light flash on and off exactly six times.
Most programming languages contain a relatively small number of commands. The complexity
of computers comes from combining and repeating the instructions several million times a
second.
Here's a generic program.
1. Do this
2. Do that
3. Jump to instruction 6
4. Do the other thing
5. All done, sleep
6. If switch closed, do that thing you do
7. Jump to instruction 4
The computer will execute this line by line. The art of programming is simply a matter of
translating your intent into a sequence of instructions that match.
Here is an example of a for loop command followed by a branch command that uses an IF
statement
for (i=0;i<6,i++) {
instructions
}

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