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:
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.