uint32_t Filter = ADC << 10;uint16_t Current;while(1){ PT_YIELD(pt); uint16_t Current = Filter >>10; if(ADC > Current) Filter++; if(ADC < Current) Filter--;};