-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbrick.html
More file actions
421 lines (417 loc) · 13.3 KB
/
brick.html
File metadata and controls
421 lines (417 loc) · 13.3 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 1.5.5">
<title>docs</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
<link rel="stylesheet" href="./asciidoctor.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
</head>
<body class="article toc2 toc-left">
<div id="header">
<h1>Getting Started with your Brick</h1>
<div class="details">
<span id="revnumber">version 2.4.16</span>
</div>
<div id="toc" class="toc2">
<div id="toctitle">Table of Contents</div>
<ul class="sectlevel1">
<li><a href="#introduction">1. Introduction</a></li>
<li><a href="#operating-system">2. Operating System</a>
<ul class="sectlevel2">
<li><a href="#debian-stretch-ev3">2.1. Debian Stretch (EV3)</a></li>
<li><a href="#debian-jessie-brickpi-brickpi3-pistorms">2.2. Debian Jessie (BrickPi+/BrickPi3/PiStorms)</a></li>
<li><a href="#test-the-installation">2.3. Test the installation</a></li>
</ul>
</li>
<li><a href="#java-virtual-machine">3. Java Virtual Machine</a>
<ul class="sectlevel2">
<li><a href="#ev3-brick">3.1. EV3 Brick</a></li>
<li><a href="#brickpi-3-brickpi-pistorms">3.2. BrickPi 3 / BrickPi+ / PiStorms</a></li>
<li><a href="#test-your-installation">3.3. Test your installation</a></li>
</ul>
</li>
<li><a href="#next-step">4. Next Step</a></li>
</ul>
</div>
</div>
<div id="content">
<div class="sect1">
<h2 id="introduction">1. Introduction</h2>
<div class="sectionbody">
<div class="paragraph">
<p>A Mindstorms Brick requires an environment to run a Java Virtual Machine.
The software to install is:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Operating System</p>
</li>
<li>
<p>Java Virtual Machine</p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="operating-system">2. Operating System</h2>
<div class="sectionbody">
<div class="paragraph">
<p>An operating system (OS) is system software that manages computer hardware and software resources
and provides common services for computer programs.</p>
</div>
<div class="paragraph">
<p>For LEGO Mindstorms ecosystem, <code>EV3Dev</code> is the best option for this purpose,
it provides a <code>Debian image</code> compatible with LEGO Mindsotorms EV3, BrickPi & Pistorms.</p>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
Debian is a Linux Operating System used in millions of computers on the world.
This project use Debian delivered by the project <code>EV3Dev</code> which provide a interface
to interact with <code>Lego Mindstorms EV3 Brick</code> and other boards compatible like <code>BrickPi</code> & <code>PiStorms</code>.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>Debian is a stable project and it has <a href="https://www.debian.org/releases/">released</a> multiple versions.
<code>EV3Dev</code> supports the following versions:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Debian Jessie</p>
</li>
<li>
<p>Debian Stretch</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>To install any Debian version, you will need to acquire a MicroSD Card to insert in the Brick.</p>
</div>
<div class="paragraph">
<p><span class="image"><img src="microsd.jpg" alt="image"></span></p>
</div>
<div class="sect2">
<h3 id="debian-stretch-ev3">2.1. Debian Stretch (EV3)</h3>
<div class="paragraph">
<p>EV3Dev has an excellent step by step guide to install the Debian image in the Brick.
Please, follow the link to <a href="http://www.ev3dev.org/docs/getting-started/">install EV3Dev on your Brick</a></p>
</div>
<div class="sect3">
<h4 id="increase-the-cpu">2.1.1. Increase the CPU</h4>
<div class="paragraph">
<p>Read the following article to increase the EV3 CPU:
<a href="https://lechnology.com/2018/06/overclocking-lego-mindstorms-ev3-part-2/" class="bare">https://lechnology.com/2018/06/overclocking-lego-mindstorms-ev3-part-2/</a></p>
</div>
<div class="paragraph">
<p>It is possible to increase the CPU from 300Mhz to 456Mhz. You will observe a great performance improvement when you
run your Java programs or when you use Apt.</p>
</div>
</div>
</div>
<div class="sect2">
<h3 id="debian-jessie-brickpi-brickpi3-pistorms">2.2. Debian Jessie (BrickPi+/BrickPi3/PiStorms)</h3>
<div class="paragraph">
<p>If you have BrickPi or PiStorms, It is better if you use the classic Debian Jessie image at the moment.</p>
</div>
</div>
<div class="sect2">
<h3 id="test-the-installation">2.3. Test the installation</h3>
<div class="paragraph">
<p>Once you have finished the process to install the EV3Dev image on your Brick, try to establish a remote <code>ssh</code> connection.
Verify that your Brick has a connection in the same network than your computer</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code>ssh robot@192.168.1.104</code></pre>
</div>
</div>
<div class="paragraph">
<p>And you should the following output</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code>The authenticity of host '10.0.1.2 (10.0.1.2)' can't be established.
ECDSA key fingerprint is SHA256:21hHcnrpfwFMNaZcgeR9b5YnJw7q6Eojt0ZQM83Ephk.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.1.2' (ECDSA) to the list of known hosts.
robot@10.0.1.2's password:
_____ _
_____ _|___ / __| | _____ __
/ _ \ \ / / |_ \ / _` |/ _ \ \ / /
| __/\ V / ___) | (_| | __/\ V /
\___| \_/ |____/ \__,_|\___| \_/
Debian jessie on LEGO MINDSTORMS EV3!
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.</code></pre>
</div>
</div>
<div class="paragraph">
<p>If you connected with your brick then you have completed this process and
now you will have a Brick with a complete Linux distro to run any Programming language.</p>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
Please, maintain your brick always updated.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>Execute the following commands before jump to the next step in this guide.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code>sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo reboot now</code></pre>
</div>
</div>
<div class="paragraph">
<p><strong>Now, you have Linux in your Brick!</strong></p>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="java-virtual-machine">3. Java Virtual Machine</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Java programs need a JVM (Java Virtual Machine) installed in the Brick.
Depending of the Hardware and the Debian version, you will have different options to install it.</p>
</div>
<div class="sect2">
<h3 id="ev3-brick">3.1. EV3 Brick</h3>
<div class="paragraph">
<p>For EV3, it is possible to install the following JVM:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Open JDK 11 for Debian</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Using this project, the developer has 3 alternatives to install a JVM:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Manual</p>
</li>
<li>
<p>Using the project Installer</p>
</li>
<li>
<p>Using Gradle tasks from Template Project which interacts with Installer</p>
</li>
</ul>
</div>
<div class="sect3">
<h4 id="manual">3.1.1. Manual</h4>
<div class="paragraph">
<p>You can download the last OpenJDK build for EV3 from <a href="https://ci.adoptopenjdk.net/view/ev3dev/">AdoptOpenJDK CI</a></p>
</div>
<div class="paragraph">
<p>Using the terminal, execute the following statements on a remote connection session from your EV3 Brick to
install OpenJDK on your brick.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code>wget -N https://ci.adoptopenjdk.net/view/ev3dev/job/openjdk11_build_ev3_linux/lastSuccessfulBuild/artifact/build/jri-ev3.tar.gz
sudo tar -zxvf jri-ev3.tar.gz -C /opt
mv /opt/jri-ev3/ /opt/jri-11
update-alternatives --install /usr/bin/java java /opt/jri-11/bin/java 1011
java -Xshare:dump</code></pre>
</div>
</div>
<div class="paragraph">
<p><strong>Now, you have Java on your EV3 Brick!</strong></p>
</div>
</div>
<div class="sect3">
<h4 id="installer">3.1.2. Installer</h4>
<div class="paragraph">
<p>Using the terminal, execute the following statements on a remote connection session from your EV3 Brick to
to execute the installer.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code>cd /home/robot
mkdir installer
cd installer
wget -N https://raw.githubusercontent.com/ev3dev-lang-java/installer/master/installer.sh
chmod +x installer.sh
sudo ./installer.sh help
sudo ./installer.sh java</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="gradle-template-project">3.1.3. Gradle Template project</h4>
<div class="paragraph">
<p>The template project provides some Gradle tasks to interact with Installer project to install Java.</p>
</div>
<div class="paragraph">
<p>The available tasks:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>getInstaller</p>
</li>
<li>
<p>installJava</p>
</li>
<li>
<p>javaVersion</p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect2">
<h3 id="brickpi-3-brickpi-pistorms">3.2. BrickPi 3 / BrickPi+ / PiStorms</h3>
<div class="paragraph">
<p>Bricks using Raspberry Pi hardware has more CPU/Memory capacity and it is possible to install from Debian Packages.</p>
</div>
<div class="admonitionblock warning">
<table>
<tr>
<td class="icon">
<i class="fa icon-warning" title="Warning"></i>
</td>
<td class="content">
The project only offer support for Debian Jessie at the moment.
</td>
</tr>
</table>
</div>
<div class="sect3">
<h4 id="debian-jessie">3.2.1. Debian Jessie</h4>
<div class="sect4">
<h5 id="manual-2">Manual</h5>
<div class="paragraph">
<p>Using the terminal, execute the following statements on a remote connection session from your Brick to
install Oracle JRE 8 on your brick.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code>apt-key adv --recv-key --keyserver keyserver.ubuntu.com EEA14886
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install oracle-java8-installer
java -Xshare:dump</code></pre>
</div>
</div>
</div>
<div class="sect4">
<h5 id="installer-2">Installer</h5>
<div class="paragraph">
<p>Using the terminal, execute the following statements on a remote connection session from your Brick to
to execute the installer.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code>cd /home/robot
mkdir installer
cd installer
wget -N https://raw.githubusercontent.com/ev3dev-lang-java/installer/master/installer.sh
chmod +x installer.sh
sudo ./installer.sh help
sudo ./installer.sh java</code></pre>
</div>
</div>
</div>
<div class="sect4">
<h5 id="gradle-template-project-2">Gradle Template project</h5>
<div class="paragraph">
<p>The template project provides some Gradle tasks to interact with Installer project to install Java.</p>
</div>
<div class="paragraph">
<p>The available tasks:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>getInstaller</p>
</li>
<li>
<p>installJava</p>
</li>
<li>
<p>javaVersion</p>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="test-your-installation">3.3. Test your installation</h3>
<div class="paragraph">
<p>Once you finish the JVM installation process, it is necessary to verify the installation.
Execute the following statement to check that Java command is running in the right way.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code>java -version</code></pre>
</div>
</div>
<div class="paragraph">
<p><strong>Now, your Brick is ready to run your Java programs.</strong></p>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="next-step">4. Next Step</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Continue in the section about <a href="create-your-first-project.html">Create your first project</a></p>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-343143-18', 'auto');
ga('send', 'pageview');
</script>
</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
Version 2.4.16<br>
Last updated 2021-01-09 15:56:33 CET
</div>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.js"></script>
<script>prettyPrint()</script>
</body>
</html>