8
mitp Professional Roboter programmieren mit NXT-G für LEGO MINDSTORMS NXT von Daniel Braun 1. Auflage Roboter programmieren mit NXT-G für LEGO MINDSTORMS NXT – Braun schnell und portofrei erhältlich bei beck-shop.de DIE FACHBUCHHANDLUNG Thematische Gliederung: Robotik Prozedurorientierte Programmierung mitp/bhv 2011 Verlag C.H. Beck im Internet: www.beck.de ISBN 978 3 8266 9096 9

Roboter programmieren mit NXT-G für LEGO MINDSTORMS NXT - … · 2018-03-24 · Daniel Braun Roboter programmieren mit NXT-G für LEGO ® MINDSTORMS ® NXT Außerdem bei mitp: Aus

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 2: Roboter programmieren mit NXT-G für LEGO MINDSTORMS NXT - … · 2018-03-24 · Daniel Braun Roboter programmieren mit NXT-G für LEGO ® MINDSTORMS ® NXT Außerdem bei mitp: Aus

Daniel Braun

Roboter programmieren mit NXT-G für LEGO®

MINDSTORMS®

NXT

Außerdem bei mitp:

Aus dem Inhalt:

• Bedienung des NXT

• Grundregeln beim Roboterbau

• Grundmodelle bauen: vierrädrig, zweirädrig, mit Kettenantrieb

• Programmiergrundlagen

• Motoren

• Konstanten und Datenknoten

• Schalter, Logik und Operatoren

• Sensoren und Variablen

• Schleifen

• Display-Programme

• Sounds

• Dateien

• Eigene Blöcke

• Bluetooth

• LEGO Digital Designer

Mit diesem Buch lernen Sie, einen eigenen Roboter zu programmieren. Sie brauchen dafür lediglich einen LEGO MINDSTORMS NXT und einen Computer.

Daniel Braun erläutert das Programmieren mit der Spra-che NXT-G, die mit dem NXT mitgeliefert wird. Hiermit lassen sich einfache bis komplexe Programme nur über grafische Elemente realisieren, ohne eine Zeile Code zu schreiben. Es werden dabei keinerlei Programmier-kenntnisse vorausgesetzt.

Bevor es mit der Programmierung losgeht, stellt der Autor zunächst wesentliche Grundregeln und konkrete Bauanleitungen für Grundmodelle im Roboterbau vor, die Sie im Laufe des Buches zum Testen der Programme verwenden können.

Daraufhin wird der gesamte Funktionsumfang von NXT-Gbehandelt. Anhand zahlreicher Beispiele lernen Sie immer mehr Möglichkeiten kennen, einen Roboter zu steuern, der intelligent auf seine Umgebung reagiert und die verschiedensten Aufgaben lösen kann. Dabei geht der Autor nicht nur auf grundlegende Bewegungs-möglichkeiten des Roboters ein, sondern zeigt auch, wie Operatoren mit NXT-G dargestellt werden, so dass Sie in der Lage sind, auch anspruchsvolle Programmierauf-gaben zu lösen. So werden Sie komplexe Bedingungen meistern und eigene Blöcke erstellen können.

Der Autor hat dabei auch immer die Vorgehensweise beim Programmieren im Allgemeinen im Blick, damit auch junge Programmierer lernen, wie Programme geplant und realisiert werden, um später auch textba-sierte Programmiersprachen zu lernen.

Mit diesem praktischen Handbuch sind Sie für jede beliebige Programmieraufgabe gerüstet, um Ihren Roboter zum Leben zu erwecken.

Über den Autor:Daniel Braun beschäftigt sich schon seit Langem mit den Themen Künstliche Intelligenz und Robotik. Er nahm bereits als aktiver Teilnehmer und als Coach an zahlreichen Wettbewerben teil wie z.B. bei der First Lego League. Im Jahr 2005 trat er zusammen mit dem späteren Weltmeister im Roboter-Fußball bei den Ger-man Open des RoboCups an. Außerdem arbeitet er am Deutschen Forschungszentrum für Künstliche Intelligenz (DFKI).

ISBN 978-3-8266-9064-8

(D) €

29

,95

Alle Funktionen von NXT-G Von einfachen Befehlen bis hin zu anspruchsvollen ProgrammenZahlreiche Praxisbeispiele und ÜbungsaufgabenFür die Versionen NXT 1.0 und 2.0

ISBN 978-3-8266-9096-9ISBN 978-3-8266-9096-9

Brau

nN

XT-G

16 mm

ISBN 978-3-8266-9101-6

Robo

ter

prog

ram

mie

ren

mit

für

LEGO

®

MIN

DST

ORM

S® N

XT

978-3-8266-9096-9_umschlag4.indd 1-3 10/10/2011 7:00:57 PM

Page 3: Roboter programmieren mit NXT-G für LEGO MINDSTORMS NXT - … · 2018-03-24 · Daniel Braun Roboter programmieren mit NXT-G für LEGO ® MINDSTORMS ® NXT Außerdem bei mitp: Aus

5

Inhaltsverzeichnis

1 Einleitung . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2 LEGO MINDSTORMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.1 NXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.2 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.3 Peripherie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2.3.1 Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2.3.2 Sensoren . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

2.3.3 Verbindung . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

2.4 Verschiedene Ausführungen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

2.4.1 LEGO MINDSTORMS 8547 . . . . . . . . . . . . . . . . . . . . . . . . . . 22

2.4.2 LEGO MINDSTORMS 9797 . . . . . . . . . . . . . . . . . . . . . . . . . . 22

2.4.3 LEGO MINDSTORMS 9648. . . . . . . . . . . . . . . . . . . . . . . . . . 22

2.4.4 Elektronische Teile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3 Bedienung des NXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3.1 Hauptmenü . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3.1.1 Try Me . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3.1.2 Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3.1.3 View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

3.1.4 NXT Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

3.1.5 Datalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

4 Roboter bauen mit LEGO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

4.1 Die Steine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

4.2 Grundregeln beim Roboterbau. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

4.2.1 Symmetrisch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

4.2.2 Stabil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

4.2.3 Einfach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

4.2.4 Durchdacht . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

4.3 Antriebsarten . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

4.3.1 Räder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

4.3.2 Ketten . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

4.3.3 Beine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Page 4: Roboter programmieren mit NXT-G für LEGO MINDSTORMS NXT - … · 2018-03-24 · Daniel Braun Roboter programmieren mit NXT-G für LEGO ® MINDSTORMS ® NXT Außerdem bei mitp: Aus

Inhaltsverzeichnis

6

4.4 Motoren und Sensoren anschließen . . . . . . . . . . . . . . . . . . . . . . . . . . 44

4.4.1 Belegung . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

4.4.2 Kabellänge und Kabelverlegen. . . . . . . . . . . . . . . . . . . . . . . . . 44

4.5 Grundmodelle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

4.5.1 Vierrädriges Grundmodell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

4.5.2 Zweirädriges Grundmodell . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

4.5.3 Grundmodell mit Kettenantrieb . . . . . . . . . . . . . . . . . . . . . . . 72

5 Software-Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

6 Die Software im Überblick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

6.1 Robo-Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

6.2 Mein Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

6.3 Programmier-Oberfläche . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

6.4 NXT mit dem Computer verbinden . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

6.4.1 USB-Verbindung . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

6.4.2 NXT-Fenster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

6.5 Werkzeuge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

6.5.1 Klangbearbeitungsprogramm . . . . . . . . . . . . . . . . . . . . . . . . . 104

6.5.2 Fernbedienung . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

6.5.3 Bildbearbeitungsprogramm . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

6.5.4 NXT-Firmware aktualisieren . . . . . . . . . . . . . . . . . . . . . . . . . . 110

6.5.5 Sensoren kalibrieren. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

7 Programmiergrundlagen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

7.1 Was ist ein Programm? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

7.2 EVA-Prinzip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

7.3 Programme planen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

7.4 Übungen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

8 Hallo Welt! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

8.1 Das erste Programm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

8.2 Übungen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

9 Motoren . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

9.1 Beispielprogramme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

9.2 Entfernungen angeben . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

9.3 Motor-Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

9.4 Übungen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

Page 5: Roboter programmieren mit NXT-G für LEGO MINDSTORMS NXT - … · 2018-03-24 · Daniel Braun Roboter programmieren mit NXT-G für LEGO ® MINDSTORMS ® NXT Außerdem bei mitp: Aus

Inhaltsverzeichnis

7

10 Konstanten und Datenknoten. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

10.1 Datenknoten. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

10.2 Konstanten . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

10.3 Verbindungen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

10.4 Text-Konstanten . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

10.5 Übungen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

11 Schalter und Logik. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

11.1 Schalter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

11.1.1 Logik-Schalter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

11.1.2 Zahlen-Schalter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

11.1.3 Text-Schalter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

11.2 Logik und boolesche Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

11.2.1 Operatoren-Übersicht . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

11.2.2 Wahrheitstafeln . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

11.2.3 Venn-Diagramme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

11.2.4 Mathematische Schreibweise . . . . . . . . . . . . . . . . . . . . . . . . . 148

11.2.5 Operatoren in NXT-G. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

11.3 Vergleichen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

11.3.1 Bereiche. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

11.4 Übungen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

12 Sensoren und Variablen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

12.1 Sensoren. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

12.1.1 Warten auf Sensoren . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

12.1.2 Sensorwerte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

12.1.3 Beispielprogramme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

12.2 Variablen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

12.2.1 Variable definieren . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

12.2.2 Variable-Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

12.2.3 Beispiele . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

12.3 Übungen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

13 Schleifen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

13.1 Endlosschleifen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

13.1.1 Beispiele . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

13.2 Sensor-Schleifen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

13.3 Zeit-Schleifen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

13.4 Zähl-Schleifen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

Page 6: Roboter programmieren mit NXT-G für LEGO MINDSTORMS NXT - … · 2018-03-24 · Daniel Braun Roboter programmieren mit NXT-G für LEGO ® MINDSTORMS ® NXT Außerdem bei mitp: Aus

Inhaltsverzeichnis

8

13.5 Logiksignal-Schleifen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198

13.6 Übungen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

14 Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

14.1 Anzeige-Block. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

14.2 Ausgabe von Zahlen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206

14.3 Texte aneinanderfügen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

14.4 Übungen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

15 Display-Programme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

15.1 Stoppuhr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

15.2 Aufnehmen und Abspielen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

15.3 Der springende Punkt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216

16 Sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

16.1 Klang-Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

16.1.1 Töne . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

16.1.2 Klangdateien . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224

16.2 Übungen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224

17 Dateien . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

17.1 Schreiben . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

17.2 Schließen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

17.3 Lesen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

17.4 Error handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229

17.5 Löschen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

17.6 Logiksignale verarbeiten . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

17.7 Übungen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232

18 Eigene Blöcke . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

18.1 Eigene Blöcke erstellen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

18.2 Blöcke teilen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

18.3 Blöcke importieren . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

18.4 Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242

18.5 Übungen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243

19 Beispielprogramme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245

19.1 Sensoren kalibrieren . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245

20 Bluetooth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253

20.1 NXTs verbinden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253

20.2 Nachrichten senden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

Page 7: Roboter programmieren mit NXT-G für LEGO MINDSTORMS NXT - … · 2018-03-24 · Daniel Braun Roboter programmieren mit NXT-G für LEGO ® MINDSTORMS ® NXT Außerdem bei mitp: Aus

Inhaltsverzeichnis

9

20.3 Nachrichten empfangen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

20.4 Verbinden über NXT-G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258

20.5 Kommunikation mit drei Robotern . . . . . . . . . . . . . . . . . . . . . . . . . . . 260

20.5.1 Theorie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260

20.5.2 Implementierung . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262

20.6 Protokolle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264

20.7 Übungen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

21 LEGO Digital Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

21.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

21.2 Oberfläche . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270

21.2.1 Startbildschirm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270

21.2.2 Hauptbildschirm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271

21.3 Bedienung . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272

21.4 Werkzeuge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274

21.4.1 Auswahlwerkzeuge. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275

21.4.2 Vervielfältigungswerkzeug . . . . . . . . . . . . . . . . . . . . . . . . . . . 275

21.4.3 Drehwerkzeug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

21.4.4 Umklappwerkzeug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

21.4.5 Werkzeug für flexible Elemente . . . . . . . . . . . . . . . . . . . . . . . 276

21.4.6 Farbwerkzeug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

21.4.7 Ausblendewerkzeug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277

21.4.8 Löschwerkzeug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277

21.4.9 Tastenkürzel für Werkzeuge . . . . . . . . . . . . . . . . . . . . . . . . . . 277

21.5 Modi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

21.5.1 Aufbaumodus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

21.5.2 Anzeigemodus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

21.5.3 Bauanleitungsmodus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279

22 Perspektiven. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281

22.1 Programmiersprachen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281

22.1.1 NXC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281

22.1.2 NBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283

22.1.3 leJOS / Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283

22.1.4 pbLua. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284

22.2 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284

22.2.1 LEGO-Sensoren . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284

22.2.2 HiTechnic-Sensoren. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285

22.2.3 Mindsensors-Sensoren. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286

22.3 Community . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287

Page 8: Roboter programmieren mit NXT-G für LEGO MINDSTORMS NXT - … · 2018-03-24 · Daniel Braun Roboter programmieren mit NXT-G für LEGO ® MINDSTORMS ® NXT Außerdem bei mitp: Aus

Inhaltsverzeichnis

10

A Lösungen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289

A.1 Kapitel 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289

A.2 Kapitel 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289

A.3 Kapitel 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290

A.4 Kapitel 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290

A.5 Kapitel 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

A.6 Kapitel 12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

A.7 Kapitel 13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

A.8 Kapitel 14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292

A.9 Kapitel 16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293

A.10 Kapitel 17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293

A.11 Kapitel 18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293

A.12 Kapitel 20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294

Stichwortverzeichnis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295