<< return to Pixycam.com

Pixy2 with mBot


#1

Hi,

I’ve recently purchased a Pixy2 to try out. I also have an mBot v1.1 and will look at connecting the two once I am a bit more familiar with the Pixy2. However, I am interested in whether anyone else has successfully connected the two already.

I’ve found an example with the original Pixy:

Would connection between Pixy2 and mBot follow a similar approach?


#2

No replies but I’ve been able to work this out. I’ve used the SPI cable to connect the Pixy2 to an mBot.

Some links I found helpful for this (they are for Pixy1 but connection is the same)

I wanted my kids to be able to use the mBlock interface to code for the Pixy2. I found that an extension has been provided for Pixy1 which, although not compatible, is a useful starter on how to build them. Using the following guide (http://download.makeblock.com/mblock/mblock_extension_guide.pdf), we’ve started to create an extension for Pixy2 functions. We’ve got a couple of functions working as blocks in mBlock (e.g. getBlocks and setLamp) so will publish once a few more are ready.


#3

Hi Grant,
Sorry that no one replied to your original inquiry. Thanks for sharing your findings and congrats getting it working! It looks like really solid and useful work :slight_smile:

Keep us informed on how this project progresses!

Edward


#4

For anyone who is interested in using the mBlock (Scratch-based) environment to access a Pixy2, I created an extension to add Pixy2 blocks for this environment. Here is the description and the package:

To add in mBlock:

  • Select Extensions -> Manage Extensions
  • Search for ‘pixy2cam_spi’ and Download the extension

If this doesn’t work for some reason, you can download the zip file from GitHub and upload directly via the ‘Add Extension’ button.

Here is an example of what it looks like in the environment:
image

We’ve tried this using a Makeblock mBot and a generic Arduino Uno. It makes the Pixy2 features more accessible for junior coders who are yet to make the leap to text-based programming.

I haven’t implemented the full API as we only need a subset but you can let me know if you need more for your project and I can try to help.


#5

Hi Grant,
Nice! Thanks so much for sharing! We’ll give it a try here as well :slight_smile:

Edward