another precision:
the line in my code vs arthur
if(OCR1A>65){ //send no pulse to triac for low input voltage for 0v output
return;
}
is also to avoid the flicking and can be adjust up to 69 according to value of OCR1A (70 in this case)
instelwaarde=input value (0 to 1023)
regards