GabyC89:
retrolefty:
Also your software logic on reading inputs seems to me to be flawed:if ( digitalRead(7) == HIGH )
{
if ( digitalRead(7) == LOW )
{
contad--;
Serial.print("Contador d = ");
Serial.println(contad);
delay (100);
}
}That logic tells me if the switch is High do nothing, if it's Low do nothing also.
Lefty
My goal is to make a counter, but actuate only in the falling edge.
Well that logic won't work, the time difference from the first digital read and second digital read is only a few hundred nano seconds at most so the button cannot have changed, there is nothing forcing the code to wait for the button to go low.
Lefty