Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

17.1. multitasking

Multitasking means doing more than one thing at a time. You use multitasking in a program to make your robot perform two (or more) independent tasks simultaneously. For example, your program could have one section to control the robot’s navigation and a separate section to collect sensor data.

In NXT-G, multitasking is accomplished using multiple Sequence Beams. Figure 17-1 shows an example based on the AroundTheBlock program introduced in Chapter 4. The blocks on the Sequence Beam at the top of the program move the TriBot around a square, and the blocks on the Sequence Beam at the bottom continually display the motor position.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial