4

I've run into this a couple of times when trying to use libraries written for Arduino on a particle photon. Many have the line:

 #include <pins_arduino.h>

which returns the error on the photon compiler:

 fatal error: pins_arduino.h: No such file or directory

I had similar trouble with:

 #include <WProgram.h>

and found an easy fix was to replace that with

 #include "application.h"

I'm wondering if there's a similar easy fix for pins_arduino?

  • Are you using the web IDE or using Particle Dev? – Len Sep 19 '16 at 13:28
  • Also, why would you want to include pins_arduino.h in the first place? It is specifically made for the Arduino, so I don't expect the Photon will accept it. – Len Sep 19 '16 at 13:30
1

There are some Arduino libraries, that just implements functionalities that do not depend on hardware. Example of these are almost all those libraries that deal with data structures/types (strings, arrays, trees, lists, etc), or particular algorithms. If such libraries do not depend on other Arduino-specific libraries, you can use them almost certainly.

Other libraries, instead, heavily depend on the hardware currently used on the Arduino boards. In those cases, the library must access the hardware, therefore they will include verious headers, such as pins_arduino.h (in particular, pin_arduino.h .

These won't work without heavy modification of such libraries and/or the creation of a wrapper header to "emulate" the required functionalities and define the required macros/constants, according to your hardware.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.