I mentioned in Chapter 3 that the 2.0 version of the NXT-G software comes with a tool that will allow you to create your own small images that can be displayed on the LCD screen. That tool is called Image Editor and it's extremely easy to use. I'm going to walk you through creating a custom image in this appendix.
After opening up your NXT-G software (version 2.0), click on the Tools menu and select Image Editor from the drop-down list. Figure C-1 shows the Image Editor tool open.
One of the best ways to learn how to use this tool is to open an existing image and make some changes. To do this, click the Open button in the upper-left corner of the tool. You'll see a new window open that displays a list of the current images stored on your computer's hard drive, as shown in Figure C-2.
I selected Boom.ric
but feel free to select any image you like. After you've clicked on a file, click the OK button. The image will open in the Image Editor tool, as shown in Figure C-3.
I'd now like to edit the word "Boom" inside the image and change it to something else. To do this, I'll use the tools that are available as buttons along the left side of the Image Editor tool. In Figure C-4, I've selected the Erase tool, and I simply hold down my mouse button and drag the mouse pointer over any pixels I wish to remove.
Next, I select the Pencil tool. While I'm holding down the mouse button, any pixel I move the Pencil tool over will be filled in. I can go back and use the Erase tool to fix mistakes. Figure C-5 shows my new image, which I'll call "Zap."
I can see the results of my editing in the Preview window in the upper-right corner of the tool. In addition to the Erase and Pencil tools, I have access to the Rectangle tool, which allows me to draw squares and rectangles, the Ellipse tool, which allows me to create circles and ellipses, and the Text tool, which can put text on the screen. There's a selection tool for circling a part of your image then moving that selected part around. Below the tool buttons are the Small, Medium, and Large buttons, which allow you to change the thickness of the edges when using the Rectangle or Ellipse tools. And finally, there's the Undo and Redo buttons at the bottom-left corner of the tool, which allow you to correct mistakes (click the Undo button) or add back in something you've removed like an erased bit of image) by clicking the Redo button.
After you've created your new image (or modified an existing one), all you need to do is save your work. Click the Save button and give your new image a name, as shown in Figure C-6. If you're editing an existing image, don't overwrite the original—always remember to give your edits a new name. Figure C-6 shows I've saved this file as Zap
.
After saving your image, click the Close button to close the Image Editor tool.
Now all that's left is to use your new image with a DISPLAY
block. Drop a DISPLAY
block into your program and scroll down the File list until you find the name of your new image. Figure C-7 shows that I've located the Zap image and selected it to be displayed on the LCD screen.
And that's it! I have a new custom image that I can use in my NXT-G programs to display a large "Zap!" on the LCD screen.