Pixy2 connection to photon



I’m trying to connect pixy2 to patricle photon but I had no luck in connecting them together, if anyone managed to connect them please share your discovery.


Cant upload a new library

What have you tried?
How do you want to talk to the Pixy2 (UART, SPI, …)?

I only have a Pixy (1) without issue.


I tried this tutorial, it didn’t work because i have pixy2

then I tried copy/pasting the arduino libraries from pixy2 website to particle ide but it didn’t work

I want to connect it to get information to the particle cloud, I’m kinda new to this :slight_smile:


The Pixy2 library needs some minor changes.
Try this version

I can’t test it without the hardware.


it worked :smiley:

Thanks for your help (Y)


@ScruffR I am not able to access the library, could you please update the link?

Secondly could you please specify what those minor changes are? I am trying to hook pixy2 with Particle Argon


Sorry, I have since removed the project from my repository, maybe @hasanals still got it, but IIRC the changes were really trivial.

I do have a private Pixy2 library on Web IDE but I’d have to check whether this builds as is and then I can make it public but would need someone to test if it actually works as I still haven’t got the Pixy2 hardware to test it myself.

Or you try this library


@ScruffR Thanks for the quick response. I tried this library earlier however, it adds #include <Camera_Pixy2.h> , which on compiling gives the error: pixy2test.ino:2:26: Camera_Pixy2.h: No such file or directory

Any way around this? I mean i can try to add each of the header files manually, but whats causing this issue?


I can have a look at this some time later.


Thanks @ScruffR

@hasanals Would you be able to share the library?


Can you give this a try?

At the moment the buzzer won’t work since the original implementation is using AVR specific code that I just wasn’t ready to port especially since mesh devices currently don’t expose enough free timers to do the background playing.


Hey @ScruffR,

First of all thank you again for your quick response. I am gonna try this now, however, i was going through the files, and realized Pixy2.h and Pixy2SPI_SS.h are very similar to each, where in the latter file we are explicitly declaring the SS pin? Which of these two would you recommend on using?

Secondly, i was looking at the Pinout for the Argon, and it specifies pin A5 is the SPI_SS. However, looking at the reference document it states the following

Where, the parameter ss is the SPI device slave-select pin to initialize. If no pin is specified, the default pin is SS (A2)

In the case of this library, which of the two pins needs to be used for SS?


Just wanted to update on this, i was able to make it work, ended up using Pixy2SPI_SS.h, and A5 as the SS pin.

With that said, a side question, is it possible to open the Serial Terminal on the Web IDE? Or in the case of Particle Argon, its only possible via VS code?


Since you currently have the sources at hand, you can hardcode any free pin you want. Once you can confirm that the library actually works I can incorporate these changes (including selection of an alternative SPI interface like SPI1) and hopefully reenable buzzer control.

Web IDE unfortunately doesn’t feature a built-in serial terminal but you can use any serial terminal program you like. Doesn’t have to be VS Code.


Hey @ScruffR do you want me to send the files that i modified here?


If you have modified them in a way that allows future users to select the pins freely without need to go into the library you can post the code here or better create a PR on my GitHub repo.