blob: 6317de62361869eb519ad7c09a48f311251f5dee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
'/*\n Blink\n Turns on an LED on for one second, then off for one second, repeatedly.\n \n This example code is in the public domain.\n */' Comment.Multiline
'\n' Text.Whitespace
' ' Text.Whitespace
'\n' Text.Whitespace
'// Pin 13 has an LED connected on most Arduino boards.\n' Comment.Single
'// give it a name:\n' Comment.Single
'int' Keyword.Reserved
' ' Text.Whitespace
'led' Name
' ' Text.Whitespace
'=' Operator
' ' Text.Whitespace
'13' Literal.Number.Integer
';' Punctuation
'\n' Text.Whitespace
'\n' Text.Whitespace
'// the setup routine runs once when you press reset:\n' Comment.Single
'void' Keyword.Reserved
' ' Text.Whitespace
'setup' Name.Builtin
'(' Punctuation
')' Punctuation
' ' Text.Whitespace
'{' Punctuation
'\n' Text.Whitespace
' ' Text.Whitespace
'// initialize the digital pin as an output.\n' Comment.Single
' ' Text.Whitespace
'pinMode' Name.Function
'(' Punctuation
'led' Name
',' Punctuation
' ' Text.Whitespace
'OUTPUT' Keyword.Reserved
')' Punctuation
';' Punctuation
' ' Text.Whitespace
'\n' Text.Whitespace
'}' Punctuation
'\n' Text.Whitespace
'\n' Text.Whitespace
'// the loop routine runs over and over again forever:\n' Comment.Single
'void' Keyword.Reserved
' ' Text.Whitespace
'loop' Name.Builtin
'(' Punctuation
')' Punctuation
' ' Text.Whitespace
'{' Punctuation
'\n' Text.Whitespace
' ' Text.Whitespace
'digitalWrite' Name.Function
'(' Punctuation
'led' Name
',' Punctuation
' ' Text.Whitespace
'HIGH' Keyword.Reserved
')' Punctuation
';' Punctuation
' ' Text.Whitespace
'// turn the LED on (HIGH is the voltage level)\n' Comment.Single
' ' Text.Whitespace
'delay' Name.Function
'(' Punctuation
'1000' Literal.Number.Integer
')' Punctuation
';' Punctuation
' ' Text.Whitespace
'// wait for a second\n' Comment.Single
' ' Text.Whitespace
'digitalWrite' Name.Function
'(' Punctuation
'led' Name
',' Punctuation
' ' Text.Whitespace
'LOW' Keyword.Reserved
')' Punctuation
';' Punctuation
' ' Text.Whitespace
'// turn the LED off by making the voltage LOW\n' Comment.Single
' ' Text.Whitespace
'delay' Name.Function
'(' Punctuation
'1000' Literal.Number.Integer
')' Punctuation
';' Punctuation
' ' Text.Whitespace
'// wait for a second\n' Comment.Single
'}' Punctuation
'\n' Text.Whitespace
|