Chapter 7. Wired!

Some of the questions I hear the most are related to data hubs and wires—and for good reason! A block's data hub can be confusing, especially when a block has numerous options on the hub. And wires can be just as difficult to figure out.

In this chapter, I want to take a short break from learning about any new NXT-G programming blocks and give you some background and tips on how to use data hubs and wires. I'll also be using some of the NXT-G blocks you've already learned about, so you'll be able to see how these crazy things called wires actually work. I hope that any confusion you have will be cleared up by the end of this chapter.

The Problem

To help you understand hubs and wires, let me start with a fake programming block called ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.