Go Down

Topic: Sensirion SPS30: how to install I2C driver/library? (Read 662 times) previous topic - next topic



Has somebody already tried SPS30 I2C driver/library?

I can't figure what files to put into what folder and how to include library.
There are instructions but they seem to be too "generic" for me to understand.
Any help would be great.

I have been able to get many other libraries/drivers to work with no problem.



Vacuum tube guy in a solid state world


Those methods don't work. I tried.

Please check SPS30 library before giving advice.


Normally Arduino IDE demands a certain way to handle downloaded libraries. The library can't have "sepcial demands".
I download the cipfiles to "Documents/Arduino". Then I use the library handler within the IDE, found in the "Sketch" tab. Include zip library…..


Those methods don't work. I tried.

Please check SPS30 library before giving advice.
Advice? You asked for help for how to install a library. That's the help you got.

Okay, I so I just checked the SPS30 library. My advice now is to read the information contained within the repo because it is not a library, it is half the source code required to build the library. You also need this repo:


You will need a *nix machine to clone the repositories and build the appropriate library for either hardware or software based I2C and the target processor being utilized.

If you don't know how to build software per the instructions in the repo, perhaps you should ask the manufacturer to post pre-built libraries in Github so that users such as yourself can utilize their products.
Vacuum tube guy in a solid state world



Did you find any solution to get this Sensirion library from their github work?


Has anyone managed to get this library working on arduino? If so can you please post a guide.


Did someone successfully get it working? I changed the hw_i2c_implementation according to their instructions and example but my compiler does neither find Arduino.h nor Wire.h.

Also in their example, there are instructions:
 * sht.h, shtxx.c, sht_common.h, sht_common.c, sensirion_i2c.h,
 * hw_i2c/configuration.h, hw_i2c/configuration_Arduino.cpp"
But I searched my whole hard drive for sht.h and am not able to find it.

EDIT: Okay, I got it working and its really damn easy... Just copy the arduino hw i2c implementation into the sps30_i2c folder. Then copy the sps30_i2c folder into the library folder and try to upload the example. Worked for me. The sensor is sending measurements!


I'm trying to get my SPS30 sensor working on a Particle Photon but the library is a mess.

Can you share your working library with me please so I can try to get it working based on what you currently have working?


Greate that You succeded! Have You sent this message to the old topic You started? Lots of people rubbed their minds….


anyone else gotten this to work? I keep getting errors when compiling?



I have followed the instructions (on MacOS) and got a viable folder in my Arduino setup - almost :-(
On building this I get typedef conflicts because I have not adjusted sensirion_arch_config.h

Errors such as "previous declaration as 'typedef short unsigned int u16' typedef unsigned short u16"

I guess I could work through these one by one. 

Anyone have a version of this file for one of the common Arduinos, ideally Leonardo?



The correction to the supplied sensirion_arch_config.h was just:

//typedef uint16_t u16;
typedef short unsigned int u16;

now compiles on 3 arduinos I tried.



The project is not complete but its simple and works properly


somebody got the SPS30 to work in I2C mode?
I have tried with ESP8266 (Wemos D1 mini) - but get only "probe failed"
I2C connection is fine, I get with I2C scanner the right address back.

Maybe somebody have an idea (or working sample)? ;)


Go Up