Hi Everyone,
I'm working with the Adafruit SAMD21 (M0) to get data from multiples sensors.
For Example the PressureSensor I get the data only by the function
SensorPressure spres;
and afther that I get the data by an spres.getPressure();
I have a cpp file with the instructions for each sensor and a h
file with the variables.
The cpp File of Pressure Sensor,
//Initialize SensorPressure
SensorPressure::SensorPressure()
{
}
With the function SensorPressure spres; I have access to all the variables on the SensorPressure.cpp
However, If try to create a function SensorRain sRain; I show this error on Arduino IDE.
error: no matching function for call to 'SensorRain::SensorRain()'
58 | SensorRain sRain;
| ^~~~~
In file included from C:\Users\User\Documents\Arduino\File_Temp\File_Temp.ino:15:
C:\Users\User\Documents\Arduino\libraries\SensorRain/SensorRain.h:13:2: note: candidate: 'SensorRain::SensorRain(int)'
13 | SensorRain(int interrupt_pin);
| ^~~~~~~~~~
Blockquote
I can not read the variables on the SensorRain.cpp Files.
Thanks for your help.