Mindsensors Vision Subsystem v4 for NXT

I am using the BrickPi in a Robotics class I’m taking this semester. Our task for next Friday (2/27) is to build a line follower robot, and a robot with dead reckoning capabilities. I think I have the dead reckoning down, and I had the line follower figured out with the light sensor. However, today in class our professor came in and told us we had to use the NXTCam-v4 from Mindsensors.

I was just wondering if there was any support for this, or if anyone had tried it out with the BrickPi. It seems like its a very powerful tool, but I don’t know if I can utilize it with the BrickPi.

Any ideas would be great! Thank you!

Hey Williamsr.andrew,

We haven’t developed any support for it. That would be a great quesiton for mindsensors though, if their libraries support the BrickPi. We’ve purposefully left our architecture and design open (unlike some of our competitors) so that other sensors can be adapted to the platform.

Please let us know what you find!


So what I’ve found is that the camera works through I2C serial communication, which I know the BrickPi supports. I haven’t really had time to play with it much, but I did set up some test code to set up the camera as an I2C sensor and spit out data from the sensor. It’s just giving me a number between 999 and 1001 (typically just 1000).

I didn’t find any example code for I2C sensors in the examples folder, is there any other support out there? I haven’t worked a whole lot with I2C so I’ll probably look into more over the next few days, but if you have any resources specifically for the BrickPi that would be much appreciated.


Hey Andrew, sorry for leaving you hanging. Since I don’t know their product very well, I don’t have a great answer off the top of my head. We’ve never played around with their camera device.

Have you seen OpenCV? You can get pretty far with it. We did a blog post and another engineer did an awesome project with OpenCV for tracking devices. All it takes is a Pi Camera.


You should be able to get the Pi Camera to do just about everything.

A couple of good templates for hooking up custom I2C devices to the BrickPi using Python:

Our Tetrix examples here: https://github.com/DexterInd/BrickPi_Python/tree/master/Tetrix

Also our dCompass example here: https://github.com/DexterInd/BrickPi_Python/blob/master/Sensor_Examples/DI-dCompass_Test.py

Both setup I2C devices and show how to send and receive from the BrickPi to an I2C slave sensor.

If you get this working, we’d really like to hear about it. Either way, if you use the NXTCam or the Pi Camera!

Thanks for all the information! We actually had our “robot day” today where all of the groups ran through some line following courses. Me and my partner for the project ended up using an NXShield with the Arduino which has libraries for the NXTCam. I didn’t really have enough time to devote to getting the NXTCam working with the BrickPi.

I did send those links to the RPi camera and OpenCV to my professor, so maybe he will buy some of those for future use. It seems like the OpenCV software is a bit more powerful than the built in functionality of the NXTCam.

I’m not sure if I will get another chance to work with the NXTCam, but near the end of the semester we have a project to build a Rubik’s Cube solver, so I may suggest getting the RPi camera to complete that project. I assume the RPi camera should have ample resolution and color accuracy to see 9 different colored tiles on a Rubik’s cube.