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 #51 background imageLoading...
Page #51 background image
The output looks as follows when you send the character A again:
Unknown command: 65
41
101
1000001
A
Depending on the format specifier,
Serial.println
automatically converts a byte
into another representation. DEC outputs a byte as a decimal number, HEX
as a hexadecimal number, and so on. Note that such an operation usually
changes the length of the data that get transmitted. The binary representation
of the single byte 65 needs 7 bytes, because it contains seven characters.
Also note that we have to use
Serial.write
instead of
Serial.println
to output a
character representation of our command value. Former versions of the
Arduino IDE had a
BYTE
modifier for this purpose, but it has been removed
in Arduino 1.0.
Numbering Systems
Its an evolutionary accident that 10 is the basis for our numbering system.
If we had only four fingers on each hand, itd be probably eight, and wed
probably have invented computers a few centuries earlier.
For thousands of years, people have used denominational number systems,
and we represent a number like
4711
as follows:
4×10
3
+ 7×10
2
+ 1×10
1
+ 1×10
0
This makes arithmetic operations very convenient. But when working with
computers that interpret only binary numbers, its often good to use number-
ing systems based on the numbers 2 (binary), 8 (octal), or 16 (hexadecimal).
The decimal number
147
can be represented in octal and hexadecimal as:
0223=3×8
0
+2×8
1
+2×8
2
0x93=3×16
0
+9×16
1
In Arduino programs, you can define literals for all these numbering systems:
int decimal = 147;
int binary = B10010011;
int octal = 0223;
int hexadecimal = 0x93;
Binary numbers start with a B character, octal numbers with a 0, and hex-
adecimal numbers with 0x. Note that you can use binary literals only for
numbers from 0 to 255.
report erratum discuss
Using Serial Ports 31
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