You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue:
HCSR04 is connected as in J5 wiki to the pin 22.
HCSR is giving correct values for some time, after which it is hanging/ freezing. On investigation we found that onChange is not getting any values but onData is showing constant values.
We noticed that HCSR object is only freezing whereas everything else is working as expected.
Note:
To quickly check we connected the same via serial-port it apparently is working fine.
var this.pinTrig = 22;
this.usSensor = new five.Proximity(
{controller: 'HCSR04', pin: this.pinTrig}
);
this.usSensor.on('change', data => {
this.level = data.inches;
};
this.usSensor.on('data', data => {
console.log("in: ", data.inches);
};
Question:
Not sure what is going wrong. Please help us identify where the problem could be.
The text was updated successfully, but these errors were encountered:
Setup:
Issue:
HCSR04 is connected as in J5 wiki to the pin 22.
HCSR is giving correct values for some time, after which it is hanging/ freezing. On investigation we found that onChange is not getting any values but onData is showing constant values.
We noticed that HCSR object is only freezing whereas everything else is working as expected.
Note:
To quickly check we connected the same via serial-port it apparently is working fine.
Question:
Not sure what is going wrong. Please help us identify where the problem could be.
The text was updated successfully, but these errors were encountered: