ok, it's true I am generating an analog wave but the interrupt pin are digital so they can only "say": I am under or over a value. I can solve the problem in this software way:
void my_interrupt_handler()
{
static unsigned long last_interrupt_time = 0;
unsigned long interrupt_time = millis();
// If interrupts come faster than 200ms, assume it's a bounce and ignore
if (interrupt_time - last_interrupt_time > 200)
{
Serial.println("I am in the IRS");
}
last_interrupt_time = interrupt_time;
}
but I cannot anyway understand why 2 ISR are called if printing values I have never changing state like 000010111000 but always non bouncing like 0000011111111100000000...
Thanks for your suggestion