-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't compile with Visual Studio and Platformio #259
Comments
Have you resolved this compilation error, yet? If not, I recommend you make sure that you're using a current version of the Arduino IDE, and have all of the ST_Anything libraries downloaded and placed in the correct directory per the ReadMe. Also, please be sure you are using one of the supported microcontrollers that supports hardware interrupts, as you're attempting to use the PS_PulseCounter device class. |
I just saw the title of this issue - Visual Studio and PlatformIO... I have never used those tools to compile ST_Anything. I have only ever used the Arduino IDE. |
No, I also don't have an idea why the problem comes with just this class.
It uses, behind the scenes, the same arduino framework of the Arduino IDE. With Visual Studio and Platformio it just looks more similar to other IDEs. I have no clue what could cause the error, and just in that class. |
So, I was able to find a way to compile the code. Writing this
solves the problem. I don't know, but it looks that using directly the int value (inttype) breaks the function call, because the only valid header expects a PinStatus. Seaching arount about PinStatus and int conversion I've found this: arduino/ArduinoCore-API#25 |
Hi!
When I add the code to my simple project (just the start class of the sensor) I can't compile it due to the following error:
[PATH_TO]/ST_Anything/Arduino/libraries/ST_Anything/PS_PulseCounter.cpp:83:72: error: no matching function for call to 'attachInterrupt(byte&, void (&)(), int&)'
As soon I remove the class and its header I can compile the project and it works without any problem.
Could you help me or check why I get this error, please?
Thank you!
The text was updated successfully, but these errors were encountered: