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
First of all, I see no activity in this repo since a while ago, and even if I'm currently using it in a project of mine, are there any reasons that I shouldn't?
Now to the question.
First version of my code was using: $pin[$sensore]->setEdge(InputPinInterface::EDGE_BOTH);
but then I realized I only was actually inerested to check when the input became from LOW to HIGH, so I changed it to $pin[$sensore]->setEdge(InputPinInterface::EDGE_RISING);
What I noticed, tho, is that I kept getting the same amount of events of the first version.
It's a motion sensor which is activated, and then deactivates itself after 2-3 seconds, and even if I try and select only EDGE_RISING (activation in this case) I get an event both when sensor activates (LOW->HIGH) and when it deactivates (HIGH->LOW).
Shouldn't matter much as I can prune those event I'm not interested in, I just wonder if it wouldn't use less resources if it worked as intended.
The text was updated successfully, but these errors were encountered:
First of all, I see no activity in this repo since a while ago, and even if I'm currently using it in a project of mine, are there any reasons that I shouldn't?
Now to the question.
First version of my code was using:
$pin[$sensore]->setEdge(InputPinInterface::EDGE_BOTH);
but then I realized I only was actually inerested to check when the input became from LOW to HIGH, so I changed it to
$pin[$sensore]->setEdge(InputPinInterface::EDGE_RISING);
What I noticed, tho, is that I kept getting the same amount of events of the first version.
It's a motion sensor which is activated, and then deactivates itself after 2-3 seconds, and even if I try and select only EDGE_RISING (activation in this case) I get an event both when sensor activates (LOW->HIGH) and when it deactivates (HIGH->LOW).
Shouldn't matter much as I can prune those event I'm not interested in, I just wonder if it wouldn't use less resources if it worked as intended.
The text was updated successfully, but these errors were encountered: