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 ...

Get Lego Mindstorms NXT-G Programming Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.