About writing library for Photon

hi: I want to write some objects libraries for photon. I wonder if there anything I need to know. Also I was trying to compile the my code it says the HIGH is declared in the scope. So it sounds like I need to include some libraries before I can do it. What should I do.

@mikelo, much like Aduino which uses #include "Arduino.h" to define the Arduino environment, the Particle devices use #include "application.h". Having a look at existing libraries should give you plenty of guidance. :smile:

1 Like

Thank you so much.

1 Like

Also you might take a look at the example library project which is documented in the Guide
https://docs.particle.io/guide/getting-started/build/photon/#contribute-a-library

1 Like