Go Down

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

tipo1000

Hello,

Has somebody already tried SPS30 I2C driver/library?
https://github.com/Sensirion/embedded-sps

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.

Thanks,
Tipo

WattsThat

Vacuum tube guy in a solid state world

tipo1000

Those methods don't work. I tried.

Please check SPS30 library before giving advice.

Railroader

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…..
Use Your knowledge. If that's not enough, look for education.
Having knowledge, think outside the box to gain more of it. Only trains run like the train, on the rails. The rest run between the rails.

WattsThat

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:

https://github.com/Sensirion/embedded-common

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

spirit1

@tipo1000

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

matfer95317

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

Skelot

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:
Quote
"copy
 * 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!

SolarDude

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?

Railroader

Greate that You succeded! Have You sent this message to the old topic You started? Lots of people rubbed their minds….
Use Your knowledge. If that's not enough, look for education.
Having knowledge, think outside the box to gain more of it. Only trains run like the train, on the rails. The rest run between the rails.

cheetahgod

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

paul_tanner

Hi,

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?

Thx.

paul_tanner

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.

kvital

Enjoy
https://github.com/KVital/SPS30/blob/master/dust.ino

The project is not complete but its simple and works properly

micha_pr

Hi,
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)? ;)

Thanks!
Michael

Go Up