Skip to Content
Arduino Cookbook, 2nd Edition
book

Arduino Cookbook, 2nd Edition

by Michael Margolis
December 2011
Intermediate to advanced
724 pages
16h 19m
English
O'Reilly Media, Inc.
Content preview from Arduino Cookbook, 2nd Edition

Appendix G. ASCII and Extended Character Sets

ASCII stands for American Standard Code for Information Interchange. It is the most common way of representing letters and numbers on a computer. Each character is represented by a number—for example, the letter A has the numeric value 65, and the letter a has the numeric value 97 (lowercase letters have a value that is 32 greater than their uppercase versions).

Values below 32 are called control codes—they were defined as nonprinting characters to control early computer terminal devices. The most common control codes for Arduino applications are listed in Table G-1.

Table G-1. Common ASCII control codes

Decimal

Hex

Escape code

Description

0

0x0

'\0 '

Null character (used to terminate a C string)

9

0x9

'\t '

Tab

10

0xA

'\n'

New line

13

0xD

'\r '

Carriage return

27

0x1B

 

Escape

Table G-2 shows the decimal and hexadecimal values of the printable ASCII characters.

Table G-2. ASCII table
 

Dec

Hex

 

Dec

Hex

 

Dec

Hex

Space

32

20

@

64

40

`

96

60

!

33

21

A

65

41

a

97

61

"

34

22

B

66

42

b

98

62

#

35

23

C

67

43

c

99

63

$

36

24

D

68

44

d

100

64

%

37

25

E

69

45

e

101

65

&

38

26

F

70

46

f

102

66

'

39

27

G

71

47

g

103

67

(

40

28

H

72

48

h

104

68

)

41

29

I

73

49

i

105

69

*

42

2A

J

74

4A

j

106

6A

+

43

2B

K

75

4B

k

107

6B

,

44

2C

L

76

4C

l

108

6C

-

45

2D

M

77

4D

m

109

6D

.

46

2E

N

78

4E

n

110

6E

/

47

2F

O

79

4F

o

111

6F

0

48

30

P

80

50

p

112

70

1

49

31

Q

81

51

q

113

71

2

50

32

R

82

52

r

114

72

3

51

33

S

83

53

s

115

73

4

52

34

T

84

54

t

116

74

5

53

35

U

85

55

u

117

75

6

54

36

V

86

56

v

118

76

7

55

37

W

87

57

w

119

77

8

56

38

X

88

58

x

120

78

9

57

39

Y

89

59

y

121

79

:

58

3A

Z

90

5A

z

122

7A

;

59

3B

[

91

5B

{

123

7B

<

60

3C

\

92

5C

|

124

7C

=

61

3D

]

93

5D

}

125

7D

>

62

3E

^

94

5E

~

126

7E

?

63

3F

_

95

5F

   

Characters above 128 are non-English characters or ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Arduino Cookbook, 3rd Edition

Arduino Cookbook, 3rd Edition

Michael Margolis, Brian Jepson, Nicholas Robert Weldin
Arduino Cookbook

Arduino Cookbook

Michael Margolis
Mastering Arduino

Mastering Arduino

Jon Hoffman, Ejike (George Steve) Ifeanyichukwu, Pratik Desai

Publisher Resources

ISBN: 9781449321185Errata Page