Floyd Kelly | LEGO MINDSTORMS NXT-G Programming Guide | E-Book | www.sack.de
E-Book

E-Book, Englisch, 336 Seiten

Floyd Kelly LEGO MINDSTORMS NXT-G Programming Guide


2. ed
ISBN: 978-1-4302-2977-3
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark

E-Book, Englisch, 336 Seiten

ISBN: 978-1-4302-2977-3
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark



James Kelly's LEGO MINDSTORMS NXT-G Programming Guide, Second Edition is a fountain of wisdom and ideas for those looking to master the art of programming LEGO's MINDSTORMS NXT robotics kits. This second edition is fully-updated to cover all the latest features and parts in the NXT 2.0 series. It also includes exercises at the end of each chapter and other content suggestions from educators and other readers of the first edition. LEGO MINDSTORMS NXT-G Programming Guide, Second Edition focuses on the NXT-G programming language. Readers 10 years old and up learn to apply NXT-G to real-life problems such as moving and turning, locating objects based upon their color, making decisions, and much more. Perfect for for those who are new to programming, the book covers the language, the underlying mathematics, and explains how to calibrate and adjust robots for best execution of their programming. Provides programming techniques and easy-to-follow examples for each and every programming block Includes homework-style exercises for use by educators Gives clear instructions on how to build a test robot for use in running the example programs Please note: the print version of this title is black & white; the eBook is full color.

James Floyd Kelly is a professional writer from Atlanta, Georgia. He has written numerous books on multiple subjects, including LEGO robotics, open source software, and building your own CNC machine as well as a 3D printer. He is the editor-in-chief of the number one MINDSTORMS NXT blog, The NXT Step (TheNXTStep.com), where he is joined by fellow NXT experts who share their knowledge and designs with other robot fans around the world.

Floyd Kelly LEGO MINDSTORMS NXT-G Programming Guide jetzt bestellen!

Autoren/Hrsg.


Weitere Infos & Material


1;Contents at a Glance;5
2;Table of Contents;6
3;About the Author;16
4;About the Technical Reviewer;17
5;Acknowledgments;18
6;Introduction;19
7;CHAPTER 1 Robots and Programs;20
7.1;What Is a Robot?;20
7.2;What Is a Program?;20
7.3;Programs are for Humans Too;22
7.4;Programs are Merely Instructions;22
7.5;The Challenge of Programming;23
7.6;NXT-G;24
8;CHAPTER 2 Program Structure;29
8.1;What Do I Mean by Structure?;29
8.2;Planning Your Program’s Structure;29
8.3;Moving Into Real Code;31
8.4;Exercises;32
8.4.1;Exercise 2-1. Move One Object Nearer to Another;32
8.4.2;Exercise 2-2. Place Objects at Corners;32
8.5;What’s Next?;33
8.6;Exercise Solutions;33
8.6.1;Exercise 2-1;33
8.6.2;Exercise 2-2;33
9;CHAPTER 3 Hello World!;34
9.1;Programming the DISPLAY Block;34
9.2;Waiting for the Results;37
9.3;Doing More with DISPLAY;38
9.4;Understanding Data Hubs;40
9.5;Exercises;43
9.5.1;Exercise 3-1. Display Your Own Text;43
9.5.2;Exercise 3-2: Draw a Rectangle;43
9.6;What’s Next;44
9.7;Exercise Solutions;44
9.7.1;Exercise 3-1;44
9.7.2;Exercise 3-2;45
10;CHAPTER 4 Get Movin’;48
10.1;The MOVE block;48
10.2;Moving Forward and Backward;49
10.3;Stopping;51
10.4;Steering;52
10.5;Power Settings;52
10.6;Duration Settings;53
10.7;Braking and Coasting;54
10.8;Exercises;55
10.8.1;Exercise 4-1. Drive in a Circle;55
10.8.2;Exercise 4-2: Make an “S”;56
10.9;What’s Next?;56
10.10;Exercise Solutions;56
10.10.1;Exercise 4-1;56
10.10.2;Exercise 4-2;57
11;CHAPTER 5 Record and Playback;59
11.1;The RECORD/PLAY Block;60
11.2;Recording Movement;61
11.3;Replaying Movement;62
11.4;Having Fun with Record/Play;63
11.5;Exercises;63
11.5.1;Exercise 5-1: Record a Cha-cha-cha Movement;63
11.5.2;Exercise 5-2: Roll Forwards and Backwards First;63
11.6;What’s Next?;64
11.7;Possible Solutions to Exercises;64
11.7.1;Exercise 7;64
11.7.2;Exercise 8;64
12;CHAPTER 6 Make Some Noise!;67
12.1;The SOUND Block;67
12.1.1;Action Settings;68
12.1.1.1;Sound File;68
12.1.1.2;Tone;68
12.1.2;Note Settings;69
12.1.3;Control Settings;69
12.1.4;Function Settings;69
12.1.5;Volume Settings;69
12.1.6;Wait Settings;70
12.2;Custom Sounds;72
12.3;Exercises;75
12.3.1;Exercise 6-1;75
12.3.2;Exercise 6-2;75
12.4;What’s Next?;75
12.5;Possible Solutions to Exercises;75
12.5.1;Exercise 6-1;75
12.5.2;Exercise 6-2;76
13;CHAPTER 7 Wired!;79
13.1;The Problem;79
13.2;A Simple Solution;80
13.3;The NXT-G Solution;81
13.4;An Example;85
13.5;Types of Data;87
13.6;Variables;88
13.7;A Real NXT-G Block;88
13.8;What’s Next?;90
14;CHAPTER 8 True or False?;91
14.1;One or the Other;91
14.2;Sensors: Yes or No;92
14.3;Variables and the Logic Type;93
14.4;Using Logic to Configure Settings;96
14.5;Exercise 11;98
14.6;What’s Next?;99
14.7;Exercise Solution;99
15;CHAPTER 9 Feedback;101
15.1;What’s Your Condition?;101
15.2;Configuring the Sensors;102
15.2.1;NXT Touch Sensor;103
15.2.2;RIS Touch Sensor;105
15.2.3;NXT Sound Sensor;106
15.2.4;NXT Light Sensor;106
15.2.5;RIS Light Sensor;107
15.2.6;NXT Ultrasonic Sensor;107
15.2.7;NXT Rotation Sensor;108
15.2.8;RIS Rotation Sensor;108
15.2.9;NXT Color Sensor;109
15.2.10;RIS Temperature Sensor;110
15.3;Other Input Types;110
15.4;Data Hub Power;112
15.5;Exercise 9-1;113
15.6;What’s Next?;114
15.7;Exercise Solution;114
16;CHAPTER 10 Wait for It!;116
16.1;The WAIT Block;116
16.1.1;The LIGHT SENSOR WAIT Block;119
16.1.2;The NXT BUTTONS WAIT Block;120
16.1.3;The ROTATION SENSOR WAIT Block;121
16.1.4;The SOUND SENSOR WAIT Block;121
16.1.5;The TIMER WAIT Block;122
16.1.6;The TOUCH SENSOR WAIT Block;122
16.1.7;The ULTRASONIC SENSOR WAIT Block;123
16.1.8;The COLOR SENSOR WAIT Block;124
16.1.9;Exercise 10-1;124
16.2;What’s Next;125
16.3;Exercise Solution;125
17;CHAPTER 11 Round and Round;128
17.1;Do It Again and Again and Again . . .;128
17.2;Nested Loops;136
17.3;Exercise 11-1;139
17.4;What’s Next?;143
17.5;Exercise Solution;143
18;CHAPTER 12 Decisions, Decisions;146
18.1;Left or Right? Door One or Door Two?;146
18.2;Flat and Tabbed Views;148
18.3;Choices;150
18.4;More Than Two Conditions;152
18.5;Default Decisions;157
18.6;Execution!;158
18.7;Exercise 12-1 Left or Right?;159
18.8;What’s Next?;159
18.9;Exercise Solution;159
19;CHAPTER 13 Stop It!;162
19.1;The STOP Block;162
19.2;A Looping Example;162
19.3;An Unconditional STOP;164
19.4;A SWITCH to a STOP;164
19.5;STOP for Testing;165
19.6;What’s Next?;166
20;CHAPTER 14 Pick a Card, Any Card;167
20.1;The RANDOM Block;167
20.2;The NUMBER TO TEXT Block;169
20.3;Exercise 14-1;173
20.4;What’s Next?;173
20.5;Exercise Solution;173
21;CHAPTER 15 Apples and Oranges;177
21.1;Logic;177
21.2;A Random Example;177
21.3;The COMPARE Block;180
21.4;The Display of Logic Values;183
21.5;A Test Run;186
21.6;Exercise 15-1 Happy or Sad;187
21.7;What’s Next?;187
21.8;Exercise Solution;188
22;CHAPTER 16 Inside or Out?;191
22.1;The RANGE Block;191
22.2;Exercise 16-1 Outside a Range;201
22.3;What’s Next?;201
22.4;Exercise Solution;201
23;CHAPTER 17 Yes? No? Maybe?;205
23.1;The LOGIC Block;205
23.2;Exercise 17-1: SPOT Finds a Spot;212
23.3;What’s Next?;212
23.4;Exercise Solution;212
24;CHAPTER 18 Title = Anything You Like;215
24.1;The VARIABLE Block;215
24.1.1;Exploring the VARIABLE Block;216
24.1.2;Reading from a VARIABLE;218
24.1.3;Writing to a VARIABLE;219
24.1.4;Storing Many Values;220
24.1.5;Solving the Example Problem;223
24.2;The CONSTANT Block;228
24.3;VARIABLE vs. CONSTANT;234
24.4;What’s Next?;234
25;CHAPTER 19 Basic Text;235
25.1;The TEXT Block;235
25.2;Exercise 19-1: Counting Characters;238
25.3;What’s Next?;239
25.4;Exercise Solution;239
26;CHAPTER 20 Basic Math;242
26.1;The MATH Block;242
26.2;Exercise 20-1: Calculate Total Degrees Traveled;245
26.3;What’s Next?;245
26.4;Exercise Solution;245
27;CHAPTER 21 Staying Alive;249
27.1;The KEEP ALIVE Block;249
27.2;Exercise 21-1: Loop Forever or Sleep?;251
27.3;What’s Next?;251
27.4;Exercise Solution;251
28;CHAPTER 22 Your Own Filing Cabinet;253
28.1;Introducing the FILE ACCESS Block;253
28.2;Exercise 22-1: Left, Right, Left;259
28.3;What’s Next?;259
28.4;Exercise Solution;259
29;CHAPTER 23 Calibration;265
29.1;The CALIBRATE Block;265
29.2;Put the CALIBRATE Block to Work;266
29.3;The Calibrate Sensors Tool;268
29.4;What’s Next?;270
30;CHAPTER 24 Motoring;271
30.1;The MOTOR Block;271
30.2;The RESET MOTOR Block;273
30.3;Exercise 24-1: True Readings;275
30.4;What’s Next?;275
30.5;Exercise Solution;276
31;CHAPTER 25 Messages;279
31.1;The BLUETOOTH CONNECTION Block;279
31.1.1;Some Preliminaries;279
31.1.2;Configuring a Connection;280
31.1.3;Initiating a Connection;282
31.1.4;Closing a Connection;283
31.2;The SEND MESSAGE Block;283
31.3;What’s Next?;288
32;CHAPTER 26 My Block Is Your Block;289
32.1;Creating a My Block;289
32.2;Exercise 26-1: The MyBlock Plug;296
32.3;You’re Ready to Go!;296
32.4;Exercise Solution;296
33;APPENDIX A Math Basics for NXT;301
33.1;Converting Between Degrees and Rotations;301
33.2;Converting Degrees and Rotations into Distances;302
33.3;The X/Y Coordinate System in NXT;303
34;APPENDIX B SPOT Building Instructions;305
35;APPENDIX C Image Editor;317
35.1;Opening an Image;317
35.2;Modifying an Image;319
35.3;Saving an Image;320
35.4;Using Your Image;321
36;Index;322



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.