Using Arduino library for HPM dust sensor and Particle Photon


I am new to Arduino/Particle and I am trying to connect a HPM dust sensor to my Photon board.

You can find the data sheet for the sensor here:

I plan to use the library for Arduino, available at:

Anyone have advice on how to translate the Arduino code to Particle, any pitfalls I need to avoid?

Since I am a complete freshman, I have not even figured out out how to import the code to the Particle IDE…


How does the Atom / Electron come into this?

Perhaps you will be better services with a community that deals with development of Arduino projects.


The idea was to translate the Arduino code so that it can be used for a Particle Photon.


Try your question here:


It’s all C code, so there’s not much that you have to translate. Just pay attention to where in the code is making a call to an Arduino library or something that looks like it might be specific to the Arduino (functions that interact directly with the hardware, for instance) and look up the Particle documentation to see if there’s anything different going on. All of your logic functions should be fine as they are.


Will do, thanks!