O'Reilly logo

Lego Mindstorms NXT-G Programming Guide, Second Edition by James Floyd Kelly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Hello World!

There is a tradition in the world of programming for the first program you write to display the words "Hello World!" on the screen. In keeping with tradition, I'm going to show you how to create a simple version of this program for SPOT. This will allow me to demonstrate one of the simplest blocks included with the NXT software—the DISPLAY block. Once you've taken care of tradition, I'll show you the rest of the DISPLAY block's features.

Programming the DISPLAY Block

In Chapter 2, I explained to you the concept of pseudo-code. Let me now give some pseudo-code to SPOT:

SPOT, I'd like you to display the words "Hello World!" on your LCD screen.

Pseudo-code doesn't get much simpler than this. All I want SPOT to do for now is put ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required