Pixy LEGO Quick Start

Version 58 (Rich LeGrand, 09/30/2015 12:33 am) → Version 59/68 (Rich LeGrand, 09/30/2015 12:34 am)

h1. LEGO Pixy Quick Start

This guide will get you up an running quickly with Pixy and LEGO Mindstorms. You must have a LEGO Mindstorms EV3 or NXT brick with a fresh set of batteries. We try to be as detailed as possible in this guide, but it helps if you are somewhat familiar how to use your LEGO Mindstorms system.

Please follow this guide closely and by all means, *don't skip any steps*!

h2. *1. Make sure you're running the most recent LEGO Software*

We recommend running version 1.1.1 or later of the *LEGO Mindstorms EV3 Home Edition* software. If you already have it installed, go to the *Help* menu and select *Check for Software Updates* to make sure you are running the latest version.

Or you can go to the "LEGO website":http://www.lego.com/en-us/Mindstorms/downloads/download-software to download and install.

h2. *2. Make sure you're running the most recent LEGO firmware on your NXT or EV3 Brick*

*If you are using the NXT Brick* you should be running firmware version 1.31 or later. This firmware is available from the "LEGO website":http://www.lego.com/en-us/mindstorms/downloads (you need to scroll down to find it). Note, we found this confusing, but you can run the "EV3 software":http://www.lego.com/en-us/Mindstorms/downloads/download-software with NXT. In fact, this is required in order to use Pixy with LEGO -- that is, you need to be running the newer EV3 software and not the NXT software. Possibly adding to the confusion is the fact that you can't upgrade the NXT firmware from the EV3 software. You need to upgrade the NXT firmware from the NXT Software. So go ahead and upgrade your NXT's firmware, if you are running firmware that is older than 1.31.

*If you are using the EV3 Brick* you should be running firmware 1.07H or later. This firmware is available from the "LEGO website":http://www.lego.com/en-us/mindstorms/downloads (you need to scroll down to find it). You can upgrade the firmware from the EV3 Software application by going to the *Tools* menu and selecting *Firmware Update*. Interestingly, if you select *Check Online* in the Firmware Update dialog box, the latest firmware you will be able to download (at the time of this writing) is 1.06H. We recommend using 1.07H, so download that version from the "LEGO website":http://www.lego.com/en-us/mindstorms/downloads and select *Browse* in the Firmware Update dialog box to select the firmware file you just downloaded and then click on the *Download* button in the Firmware Update dialog box to download the new firmware into your brick.

h2. *3. Install the Pixy EV3 Block*

Let's install the Pixy EV3 block in the Mindstorms EV3 Software by performing the following steps:

# Download the latest "LEGO blocks and examples" file "here":/projects/cmucam5/wiki/Latest_release.
# This is a zip file, so go ahead and unzip it.
# Open the LEGO Mindstorms EV3 Software that you downloaded in step 1 above.
# Open a New Programming Project
# Browse to the location where you unzipped the "LEGO blocks and examples" file. Choose the "Pixy.ev3b" file in the ~/blocks directory.
!{width: 50%}http://i74.photobucket.com/albums/i241/cmucam/Image%20027_zpsfzwldptt.png!
# Import the Pixy EV3 block by clicking on *Import*.
# Close and restart the LEGO Mindstorms EV3 Software.

Whew, you're almost done with this installing software and firmware business. You just need to install PixyMon, which should be easy.

h2. *4. Install PixyMon*

If you're just getting started with Pixy, you should install PixyMon next. It will allow you to configure Pixy and see what it sees. Choose your platform below:

* [[Install PixyMon on Mac|PixyMon on Mac]]
* [[Install PixyMon on Windows Vista, 7, 8|PixyMon on Windows Vista, 7, or 8]]
* [[Install PixyMon on Windows XP|PixyMon on Windows XP]]
* [[Installing PixyMon on Linux|PixyMon on Linux]]

h2. *5. Teach Pixy an object*

After you install PixyMon and get it running, the next step is to [[Teach Pixy an object 2|teach Pixy an object, or 2, or 3]]...

h2. *6. Hook up to your LEGO brick and run the demo*

# Your Pixy should now be locating and tracking the objects that you taught it. (hooray!) You're now ready to connect Pixy to your LEGO brick. Use the supplied cable and the pictures below as a guide. If you are using an NXT controller, connecting Pixy is practically identical as below.
!{width: 35%}http://i74.photobucket.com/albums/i241/cmucam/IMG_4908_zpsdcikkfcf.jpg!
!{width: 35%}http://i74.photobucket.com/albums/i241/cmucam/IMG_4912_zps46vbbs19.jpg!
# Next, turn on your LEGO brick if you haven't done so, and hook up a USB cable between your computer and your LEGO brick.
# From the LEGO Mindstorms EV3 Software, go to the *File* menu and select *Open Project*.
# Browse to the location where you unzipped the "LEGO blocks and examples" file, and then to the *examples* directory and then either to the *EV3* or *NXT* directory depending on your brick version. Select "hello_world.ev3" and click on *Open*.
!{width: 50%}http://i74.photobucket.com/albums/i241/cmucam/Image%20033_zpsbqxlmv9v.png!
You should see something like this (below). This is the hello world demo program. Note the Pixy sensor block!
!{width: 50%}http://i74.photobucket.com/albums/i241/cmucam/Image%20037_zpsomtzfb29.png!
# Run the program! Click on the play icon in the lower right corner of your EV3 software window. If you don't see the play icon, make sure your LEGO brick is powered on, finished booting, and connected to you computer via a USB cable.
# If you are running PixyMon, make sure you are running the "Default program" by clicking on the home icon.
# Move the object that you taught Pixy in front its camera lens. You should see the object move on your LEGO brick's LCD screen. If you are using an NXT brick, you will still see a circle on the screen, but you will only see the outline of the circle (the NXT brick cannot fill-in circle shapes.)
!{width: 50%}http://i74.photobucket.com/albums/i241/cmucam/Image%20021_zpstc1e6nej.png!

You're done! You've successfully set up Pixy on your LEGO Mindstorms system! You are now ready to start building LEGO robot creations that use the powerful sensing capabilities of Pixy.

h2. *Troubleshooting*

* [[I get the message "No Pixy devices have been detected" in PixyMon]]
* [[Pixy is detecting the wrong objects]]
* [[Pixy isn't detecting the objects I taught it]]
* [[The image in PixyMon is out of focus]]

If the above links don't solve your issue, or if you have questions or suggestions, please send them to support@charmedlabs.com. We also have a "public forum":/projects/cmucam5/boards where you can ask technical questions about the Pixy software or hardware, and learn what the Pixy community is up to.

h2. *Digging deeper*

"Click here for the Pixy LEGO Wiki wiki index":/projects/cmucam5/wiki/LEGO_Wiki - there's tons of info here, including pointers on "how to mount Pixy to your LEGO creation":/projects/cmucam5/wiki/Mounting_Pixy_with_LEGO.

Thanks again for your support!