Getting Started with the LEGO Mindstorms & the PixyCAM    Send article as PDF   

I trust this article will get you up an running quickly with PixyCAM and the LEGO Mindstorms EV3 (NXT). Please make sure you have a LEGO Mindstorms EV3 or NXT brick with a fresh set of batteries. I will endeavor to be as detailed as possible throughout this guide, but it helps if you are somewhat familiar on how to use your LEGO Mindstorms Robotics System.

Please follow this guide closely, and Skip Steps At Your Own Risk!

1. Make sure you’re running the most recent LEGO Software:

I recommend running version v1.2.2 or later of the LEGO Mindstorms EV3 Home Edition or LEGO Mindstorms EV3 Education Edition software. If you already have the LEGO Mindstorms EV3 installed, go to its 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 to download and install the latest version.

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 v1.31 or later. This firmware is available from the LEGO website (you need to scroll down to find it). Note, that although it may appear confusing, you can program both the LEGO Mindstorms NXT & EV3 with the EV3 Programming Software. In fact, this is required in order to use PixyCAM 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 upgrade your NXT’s firmware, if you are running firmware that is older than v1.31.

If you are using the EV3 Brick, you should be running firmware v1.09H (E for Education Version) or later. This firmware is available from the LEGO website (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.08H(E). I recommend using 1.09H(E), so download that version from the LEGO website and select Browse in the Firmware Update dialog box to select the firmware file you just downloaded. Next click on the Download button in the Firmware Update dialog box to download the new firmware into your LEGO Mindstorms EV3 programmable brick.

3. Install the PixyCAM EV3 Block:

Next we need install the PixyCAM EV3 block into the Mindstorms EV3 Software, by performing the following steps:

  1. Download the latest “LEGO blocks and examples” file.
  2. This is a zip file, so go ahead and unzip it.
  3. Open the LEGO Mindstorms EV3 Software that you downloaded in step 1 above.
  4. Open a “New Programming Project” from the “File Menu”.
  5. Next from the Tools Menu, select “Block Import“. 
  6. Browse to the location where you unzipped the “LEGO blocks and examples” file. Choose the “Pixy.ev3b” file, located in the ~/blocks directory.
  7. Import the PixyCAM EV3 block by clicking on Import.
  8. Close and restart the LEGO Mindstorms EV3 Software.

You’re almost done with the installing of software and firmware. Lastly ou just need to install PixyMon.

4. Install PixyMon:

If you’re just getting started with Pixy, you should install PixyMon next. It will allow you to configure PixyCAM and view what the camera sees. Choose your platform below:

5. Teaching PixyCAM an object:

After you install PixyMon and get it running, the next step is to “Teach PixyCAM an Object“…

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

  1. Your PixyCAM should now be locating and tracking the objects that you taught it. You are now ready to connect PixyCAM to your LEGO Programmable Brick. Use the supplied cable and the pictures below as a guide. If you are using an NXT controller, connecting PixyCAM is practically identical as below. For more information, see my “Connecting the PixyCAM to LEGO Mindstorms using I2C” article.

  2. Next, turn on your LEGO brick, and hook up a USB cable between your computer and your LEGO brick.
  3. From the LEGO Mindstorms EV3 Software, go to the File menu and select Open Project.
  4. Browse to the location where you unzipped the “LEGO blocks and examples” file, and then to the examples directory and then. Next select either the EV3 or NXT directory depending on the LEGO Mindstorms Programmable Brick you intend on using. Select “hello_world.ev3“, and click on Open.

    You should now see something like below. This is the hello world demo program with the PixyCAM sensor block!

  5. 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 Mindstorms Programmable Brick is powered on, has finished booting, and is connected to you computer via a USB cable.
  6. If you are running PixyMon, make sure you are running the “Default program” by clicking on the home icon.
  7. Move the object that you taught PixyCAM 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).

Now you’re done! You have successfully set up the PixyCAM camera sensor to communicate with your LEGO Mindstorms system! You are now ready to start building LEGO robot creations that use the powerful sensing capabilities of the PixyCAM.

For more detailed info on the PixyCAM software block, check out Using the CMUcam5 Pixy Camera EV3-G Blocks​.

7. Mounting the PixyCAM to your LEGO creation:

This part is intended fo those who purchased PixyCAM for LEGO. The hardware bag that comes with PixyCAM for LEGO is slightly different, so you may have problems with this guide if you purchased a regular PixyCAM.

You will need the following tools and parts (in addition to your PixyCAM for LEGO):

A small phillips screwdriver, like the one shown below.

LEGO beams — you can use longer beams, as long as they are equal to greater in length than the beams shown below. It all depends on your preference!

Lets take a look at your hardware bag that’s included with PixyCAM for LEGO. You should have a black lens fastener, three different lengths of machine fasteners, some nylon bushings, and some right-angle brackets. These are shown and labeled below.

Take all four right-angle brackets out and examine them. Notice that two of them have two threaded holes and two of them have one threaded hole. We’ll call these 2-threaded and 1-threaded brackets, respectively. Go ahead and separate these two bracket types to make things easier.

Next, grab a 2-threaded bracket. If you look really closely, you’ll notice that one of its legs is ever-so-slightly longer than the other. Say what? It’s true— I don’t know why. But you can best see this by looking at the holes in the bracket. One of the holes is centered in its leg (see below).

and the other hole is not centered, because its leg is slightly longer (see below).

Weird. But it’s important for this first step:

1. Using two of the long fasteners, attach the 2-threaded brackets to the LEGO brick so that the long legs are touching the brick, and the short legs are pointing out.


2. Using two of the short fasteners, attach two 1-threaded brackets to your PixyCAM as shown in the picture below.

3. Take two nylon bushings and press them into the non-threaded holes in these brackets.

4. Slide the PixyCAM into the brick assembly. It should fit nice and snug! Use two of the medium fasteners, and insert them from the inside as shown in the picture.

The fasteners form part of s hinge that you can use to tilt PixyCAM camera up and down. Inserting the screws from the inside allows you to tighten them down, so PixyCAM holds the desired tilt angle. 

That’s it! Keep your PixyCAM attached to the LEGO beam, and you will always be able to easily attach PixyCAM to your LEGO creations.


If the above raises issues, or if you have questions or suggestions, please send them to me. There is also a PixyCAM public forum where you can ask technical questions about the PixyCAM software or hardware, and learn what the PixyCAM community is up to.

Previous Post

Connecting the PixyCAM to LEGO Mindstorms using I2C

In order to use the PixyCAM with the LEGO Mindstorms EV3 or NXT kit, you will need an I2C Adapter Cable. You can order a cable through some PixyCAM distributors, ... Read more

Next Post

Guide to using the PixyCAM Camera's EV3-G Blocks

In this article, I attempt to describe the LEGO PixyCAM block, which is used in conjunction with the LEGO Mindstorms EV3 Software. Check out the "Getting Started with the LEGO ... Read more

Short URL:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Do NOT follow this link or you will be banned from the site!