I am adding Dust Sensor to my particle photon project at home,
I got this GitHub project that I want to test before implementing a final code.
I am not an expert in cpp, I wanted to modularise the dust sensor codebase to separate library so I created new dustSensor.cpp file and kept the code linked above.
but I keep getting error:
'Serial' was not declared in this scope
'Serial1' was not declared in this scope
'DEBUG' was not declared in this scope
'DEC' was not declared in this scope dustSensor.cpp:13:57:
I do have Serial.begin(57600) called in setup() function but still get the above error
#include <Arduno.h>
to cppBrowse and Manage Libraries
buttons and find the library you need. that's automatically include your libraries. see this docs.