CHAPTER 5 RECORD AND PLAYBACK
Print DataMatrix In None
Using Barcode creation for Font Control to generate, create Data Matrix image in Font applications.www.OnBarcode.com
QR Code Creator In None
Using Barcode creator for Font Control to generate, create QR Code JIS X 0510 image in Font applications.www.OnBarcode.com
Figure 5-3. First, choose the Record option in the Action section. Next, we need to specify a name for the recorded movement. As an example, I want SPOT to move forward two feet (motors B and C will be spinning forward) and turn left. I then want motor A to spin the propeller a few times. I m going to type the words Takeoff in the Name text box, shown in Figure 5-4, but you can type whatever description you like that will help you remember the purpose of the recorded movement.
PDF-417 2d Barcode Encoder In None
Using Barcode maker for Font Control to generate, create PDF 417 image in Font applications.www.OnBarcode.com
Drawing Code 128 In None
Using Barcode printer for Font Control to generate, create Code 128 Code Set A image in Font applications.www.OnBarcode.com
Figure 5-4. Give your recorded movement a unique name. The name you type in the Name text box is the name of a file that will be stored on the Brick. This file must be stored on the Brick in order for you to later play back the movement, so try to make the name memorable and easy to understand. Now, look at Figure 5-5. The Recording section of the configuration panel is where you will specify which ports should be monitored. In my example, motors B and C will move my robot around, and motor A will spin the propeller. So I want to select all the ports. If you are not using one of the motor ports, you don t need to select it. You won t get an error if you select a motor port and don t use it, however.
Create Barcode In None
Using Barcode drawer for Font Control to generate, create Barcode image in Font applications.www.OnBarcode.com
Encoding ANSI/AIM Code 39 In None
Using Barcode encoder for Font Control to generate, create Code 39 image in Font applications.www.OnBarcode.com
Figure 5-5. Configure the motor ports to monitor and record. The last item you will need to configure is the amount of time (in seconds) you wish to record your bot s movements (see Figure 5-6). You can type in the number of seconds you want to record or click the up and down arrows with your mouse to select the number in the Time section.
UPC - 13 Generation In None
Using Barcode creation for Font Control to generate, create UPC - 13 image in Font applications.www.OnBarcode.com
British Royal Mail 4-State Customer Code Drawer In None
Using Barcode drawer for Font Control to generate, create Royal Mail Barcode image in Font applications.www.OnBarcode.com
Figure 5-6. Enter the number of seconds to record in the Time section. You can record anywhere from one second up into the hundreds of minutes. Is this realistic Not really. Your NXT Brick has a limited amount of memory, and you ll find that you are limited to a few minutes at most. And even recording a few minutes of movement will probably not leave much memory for your actual program. You ll have to play around with the Time section to test its limits.
Painting Data Matrix 2d Barcode In Java
Using Barcode drawer for Android Control to generate, create DataMatrix image in Android applications.www.OnBarcode.com
Data Matrix 2d Barcode Creation In C#
Using Barcode generation for .NET Control to generate, create ECC200 image in Visual Studio .NET applications.www.OnBarcode.com
Print UPC-A In Visual Basic .NET
Using Barcode drawer for VS .NET Control to generate, create GTIN - 12 image in .NET applications.www.OnBarcode.com
Make Barcode In VS .NET
Using Barcode encoder for Visual Studio .NET Control to generate, create Barcode image in Visual Studio .NET applications.www.OnBarcode.com
Once you ve got your RECORD/PLAY block configured, save the program, and upload it to your NXT bot. Place the robot at its starting position, and press the Run button for your new program. Using your hands, guide the robot through the movements you wish your robot to perform.
Recognizing Code 128C In VB.NET
Using Barcode reader for Visual Studio .NET Control to read, scan read, scan image in VS .NET applications.www.OnBarcode.com
Paint European Article Number 13 In None
Using Barcode maker for Software Control to generate, create UPC - 13 image in Software applications.www.OnBarcode.com
CHAPTER 5 RECORD AND PLAYBACK
PDF-417 2d Barcode Decoder In None
Using Barcode decoder for Software Control to read, scan read, scan image in Software applications.www.OnBarcode.com
Code-39 Creator In C#
Using Barcode encoder for .NET framework Control to generate, create Code-39 image in .NET applications.www.OnBarcode.com
For my example, I simply push the robot forward two feet and stop. I then turn the robot to the left and stop. Next, I spin the little propeller on the front of the robot five or six times, and I m finished. I suggest that you time your movements as you re doing them. If you come close to the number of seconds you configured, you can simply leave the recording time alone. If you didn t have enough time, go back and add the right number of seconds to your program, save it, and run it again to record the complete movements. Most importantly, if you originally configured too much time, reduce the number of seconds you entered in the Time section; because the recording process will continue to run until the time is over, the file stored on the Brick will be larger than it needs to be.
Making PDF417 In Java
Using Barcode generator for Android Control to generate, create PDF417 image in Android applications.www.OnBarcode.com
Draw PDF-417 2d Barcode In VB.NET
Using Barcode creator for .NET Control to generate, create PDF 417 image in .NET framework applications.www.OnBarcode.com
GTIN - 13 Reader In Java
Using Barcode scanner for Java Control to read, scan read, scan image in Java applications.www.OnBarcode.com
Recognize PDF-417 2d Barcode In Java
Using Barcode reader for Java Control to read, scan read, scan image in Java applications.www.OnBarcode.com
Okay, so you ve successfully recorded your bot s movements, and there is a file stored on the Brick with the name you gave it in the Name section (you can verify this by connecting your Brick to your computer and checking its memory contents). Now, let me show you how to play back the file. It s so easy, you re going to laugh. Create a new program, and drop in a RECORD/PLAY block. This time, however, select the Play option in the Action section (see Figure 5-7).
Note If you have your NXT Brick connected to your computer via the USB cable, any files stored on the NXT that
you created using the RECORD/PLAY block will appear in the File section seen in Figure 5-7. Rather than type the name of the file, you can select it from the list. If you do not have your NXT Brick connected, you will need to remember the name of the file and type it in the Name section.
Figure 5-7. Configure your robot to play back the recorded movement. The only other section that can be configured now is the Name section. Type the name of the file that contains the recorded movements in the Name section (see Figure 5-8). For my example, I ve typed Takeoff, the name I gave the file that moves the robot forward two feet, turns it left, and then spins the propeller a few times.