WSEN_TIDS Library issues

Hi -

I am trying to use the WSEN_TIDS sensor from Würth. They have a fairly well put together Github page with all the Arduino libraries for their sensors.

After importing everything into workbench and loading one of the example sketches, the problems started though. I tried to compile but was presented with an error which I could not even find on line 33 of any of the files included.

33 #include <chrono>

In one file there is a single red squiggly which of course though would be easy to fix... well, so I thought.

After giving up on trying to fix that, I thought I would first just comment this out and try to compile again. Unfortunately the same error persists.

I then imported the exact same library into the Arduino IDE to see whether it would compile there and it did without any problems.

Below is my folder structure in Workbench;

I have tried amending the #include paths to match the folder structure and also left it as is. In both cases the result is the same.

Not sure if this makes sense :slight_smile: Would appreciate any help :slight_smile:

Regards, Friedl.

The problem is that the source file is .c, not .cpp.

The port includes <Arduino.h> which includes <Particle.h> which can only be compiled using the C++ compiler. The reason doesn't exist is that it's C++ only and is not in the include paths for C files.

You can try renaming the .c file to .cpp and see if that works. You may end up needing some extern "C" declarations but you can add those if it turns out to be a problem.

setWireTimeout() is not supported on Particle, so you do need to comment that out.

1 Like

Hi @rickkas7

Thanks, I will try this and let you know.

Regards, Friedl.

Hi @rickkas7

Ok, so renaming the file solved the one problem (it seems) but another error came up;

This one I can solve simply by commenting out the code starting at line 429. Not sure what the consequence will be, haha. I will try to upload the code now and see whether the sensor works at least :slight_smile:


Hi @rickkas7 -

Seems to work, thanks a million!!

1 Like

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