Chapter 21. Staying Alive

Another short chapter? Of course! You can learn something and then get back to playing around with your NXT robots. But you won't get to play much if your robots keep falling asleep. This chapter will show you how to keep your robots working, even if the Sleep option on the Brick has been set to a short period of time like 2 minutes or 5 minutes.

The KEEP ALIVE Block

Your NXT Brick has a built-in feature that automatically turns off your robot after a certain amount of time has passed. This Sleep timer is configured on the Brick, and you can choose for the Brick to shut down after 2, 5, 10, 30, or 60 minutes of inactivity, or you can choose Never.

The Sleep timer is a useful feature, and you should definitely set it to a ...

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.