Wurth Sensor Arduino Libraries

I am trying to get the arduino libraries for the Wurth Sensors compiling in Particle Workbench.

I am getting a fatal error:

In file included from ./inc/Particle.h:5,
from ./inc/Arduino.h:11,
from src/ArduinoPlatform.h:37,
from src/WSEN_ITDS_2533020201601.h:31,
from src/WSEN_ITDS_2533020201601.c:25:
./inc/application.h:33:10: fatal error: chrono: No such file or directory
33 | #include
| ^~~~~~~~

I cant see anywhere in the library files where this include is located and i cant seem to find any reference to a chrono library using find libraries.
Apologies if this is a simple question, I’m quite new to Particle and the Arduino ecosystem.

Many thanks
J

Hi,
In file: WSEN_ITDS_2533020201601.c in line 32 hange
ArduinoPlatform.h
To either Particle.h or Arduino.h and then try again

Here

Best,

1 Like

Hi James,

this looks to be down to the build system a similar post Chrono: No such file or directory suggests a workaround in addition to the above header file change is to rename the WSEN_ITDS_2533020201601.c file to .cpp extension so it will be built as C++ rather than C.

I did this quickly on your sources and it threw up a bunch of errors relating to the inclusion of the ArdruinoPlatform.cpp and .h which gets you a bit further. These serve to wrap the lower level wire I2C API and may need some minor refactoring to align with the Particle DeviceOS I2C API - see Particle Wire (I2C)

You can check against a similar library published to Particle to see how this is handled for example SparkFunMMA8452Q (community library)

Hope this helps,
G

1 Like

Sorry my fault, didn’t realize that ArduinoPlatborm is in SRC already

looks like didn’t like #define TIMEOUT 1000 in ArduinoPlatborm.h (line 30)
( maybe it’s conflicting with some other definition of TIMEOUT )
I successfully build over OS2.0.1 getHumidity example from /WSEN_HIDS/examples/getHumidity/ folder and you can find it here:

I just renamed #define TIMEOUT 1000 to #define TIMEOUT2 1000
replaced #include <Arduino.h> to #include <Particle.h> in ArduinoPlatform.h (line 30 and 37) changed TIMEOUT to TIMEOUT2 in ArduinoPlatform.cpp (line 70)
Best,

UPDATE:
here is an measure_temperature.ino example from /WSEN_ITDS/examples/measure_temperature/ as looks like this is the correct one which you are interested on:

Hi @JamesP,

thanks for the additional pointers @dreamER.

I have tested a project archive bringing it all together for a building solution on OS 4.0.0 for the ITDS sensor including the various adjustments and will share it with you. I don’t have a sensor but hopefully it works on your hardware.

BR,
G

1 Like

Hi @dreamER & @gcl
Thanks for your prompt help with this issue. I have got these libraries compiling now under OS4.0.0
for b5som and receiving some valid data back from the senor :grinning:
Best regards
James

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.