-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArduinoIDE.html
More file actions
166 lines (165 loc) · 6.03 KB
/
ArduinoIDE.html
File metadata and controls
166 lines (165 loc) · 6.03 KB
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<!DOCTYPE html><html lang="de"><head>
<title>Variations on a Theme: Physical Computing</title>
<meta name="title" content="Variations on a Theme: Physical Computing">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta charset="UTF-8">
<meta name="description" content="An Introduction to Physical Computing">
<meta name="keywords" content="Physical Computing, IoT, Arduino">
<meta name="author" content="Ralph P. Lano">
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="book.css">
</head>
<body><center>
<div id="wrap">
<ul class="sidenav">
<p><a href="index.html">Variations on a Theme</a><a href="index.html">Physical Computing</a></p>
<li><a href="Safety.html">Safety</a></li>
<li><a href="Introduction.html">Introduction</a></li>
<li><a href="PassiveCmpts.html">Passive</a></li>
<li><a href="ActiveCmpts.html">Active</a></li>
<li><a href="Arduino.html">Arduino</a></li>
<li><a href="Hardware.html">Hardware</a></li>
<li><a href="Multimeter.html">Multimeter</a></li>
<li><a href="Simulator.html">Simulator</a></li>
<li><a href="ArduinoIDE.html" class="active">IDE</a></li>
<li><a href="Definitions.html">Definitions</a></li>
<li><a href="Formulas.html">Formulas</a></li>
</ul>
<div class="content"><h1>
D. Arduino IDE</h1>
<p>
Before we can use our Arduino, we need to install the Arduino IDE on our computer.</p>
<p>
.</p>
<h2>
<img alt="" src="images/Arduino_IDE.png" style="margin-left: 10px; margin-right: 10px; width: 330px; height: 403px; float: right;" />Installation of Arduino Software</h2>
<p>
Depending on your operating system, the installation may be slightly different.</p>
<h3>
Linux</h3>
<ul>
<li>
download IDE from Arduino website [1]</li>
<li>
unzip and install running ./install.sh</li>
<li>
connect Arduino board through USB</li>
<li>
you need to add your username to the tty and dialout groups:<br />
sudo usermod -a -G tty yourUserName<br />
sudo usermod -a -G dialout yourUserName</li>
<li>
logout and log back in, for changes to take effect</li>
<li>
start IDE, make sure to select your Arduino board under Tools>Board</li>
<li>
select serial port under Tools>Serial Port</li>
<li>
change language in File>Preferences</li>
<li>
load the "Blink" scetch from File>Examples>Basics</li>
<li>
run your first scetch</li>
</ul>
<h3>
Mac [4]</h3>
<ul>
<li>
download IDE from Arduino website [1]</li>
<li>
you may have to unzip the software</li>
<li>
to install it, copy the Arduino application in the Applications folder</li>
<li>
connect Arduino board through USB</li>
<li>
start IDE, make sure to select your Arduino board under Tools>Board</li>
<li>
select serial port under Tools>Serial Port</li>
<li>
change language in File>Preferences</li>
<li>
load the "Blink" scetch from File>Examples>Basics</li>
<li>
run your first scetch</li>
</ul>
<h3>
Windows</h3>
<ul>
<li>
download IDE from Arduino website [1]</li>
<li>
install software</li>
<li>
connect Arduino board through USB</li>
<li>
install drivers</li>
<li>
start IDE, make sure to select your Arduino board under Tools>Board</li>
<li>
select serial port under Tools>Serial Port</li>
<li>
change language in File>Preferences</li>
<li>
load the "Blink" scetch from File>Examples>Basics</li>
<li>
run your first scetch</li>
</ul>
<h3>
Shortcuts</h3>
<p>
The following shortcuts will become handy, when doing a lot of Arduino coding:</p>
<ul>
<li>
Ctrl-S: Save</li>
<li>
Ctrl-R: Verify</li>
<li>
Ctrl-U: Upload</li>
<li>
Ctrl-T: Pretty Print</li>
</ul>
<p>
.</p>
<h2>
<img alt="" src="images/MKR1000_pinout.png" style="margin-left: 10px; margin-right: 10px; width: 134px; height: 356px; float: right;" />Arduino Board</h2>
<p>
The schematic on the side shows the layout of the Arduino Uno. We see the USB and power connector. Usually the Arduino gets its power through the USB port. In addition we see on the lower right two sets of pins: one for power and the other for analog inputs. On the top right we see two sets of pins for digital inputs and outputs. There are also a few LEDs: the power LED, the TX and RX (for communication) and the "L" LED, the one we will be using a lot.</p>
<p>
.</p>
<h2>
Test: Blink</h2>
<p>
Getting the LED "L" to blink is actually quite easy: simply type the following code into the Arduino Software (or simply load the "Blink" scetch from File>Examples>Basics). Verify it (Ctrl-R) and Upload it (Ctrl-U) to the Arduino board. The LED should start blinking.</p>
<pre style="margin-left: 40px;">
void setup() {
pinMode(6, OUTPUT);
}
void loop() {
digitalWrite(6, HIGH);
delay(1000);
digitalWrite(6, LOW);
delay(1000);
}</pre>
<p>
(see: https://www.arduino.cc/en/Tutorial/Blink)</p>
<p>
.</p>
<h2>
References</h2>
<p>
[1] Download the Arduino IDE, <a href="https://www.arduino.cc/en/Main/Software">https://www.arduino.cc/en/Main/Software</a><br />
[2] Arduino Beginner’s Course, <a href="http://runtimeprojects.com/2016/03/arduino-beginners-course-introduction-to-arduino/">http://runtimeprojects.com/2016/03/arduino-beginners-course-introduction-to-arduino/</a><br />
[3] ESP8266 Remote Controlled Sockets, <a href="http://randomnerdtutorials.com/esp8266-remote-controlled-sockets/">http://randomnerdtutorials.com/esp8266-remote-controlled-sockets/</a><br />
[4] Install the Arduino Software (IDE) on OS X, <a href="https://www.arduino.cc/en/Guide/MacOSX">https://www.arduino.cc/en/Guide/MacOSX</a></p>
<p>
.</p>
<p class="footer">
Copyright © 2016-2023 <a href="http://www.lano.de">Ralph P. Lano</a>. All rights reserved.
</p>
</div>
</center>
</div>
</body>
</html>