im confused about the usage of the HCSR04 library.
There are several variations at iot and sometimes the definision works, sometimes not.
For example: #include <HCSR04.h>
and
UltraSonicDistanceSensor sr04(TRIG_PIN, ECHO_PIN);
Just a view minutes ago the codecheck throw an error at the line
UltraSonicDistanceSensor sr04(TRIG_PIN, ECHO_PIN);
It cant find the library(undefined device) . . .
A view seconds ago the compiler runs clean - no changes made!!!????
It's repeatable!
A good example - compiled the whole code 2 times without failures.
No changes made, at third time i get this:
/tmp/167253859/LigthsOnWifi-TreppeUnten_jul22a/LigthsOnWifi-TreppeUnten_jul22a.ino:43:1: error: 'UltraSonicDistanceSensor' does not name a type; did you mean 'CloudContactSensor'? UltraSonicDistanceSensor sr04(TRIG_PIN, ECHO_PIN); ^~~~~~~~~~~~~~~~~~~~~~~~ CloudContactSensor
#include <HCSR04.h>
and
UltraSonicDistanceSensor sr04(TRIG_PIN, ECHO_PIN);