LED brightness control

HazardsMind:

However, it immediately starts trebling.

Even without the button being pressed? Does your button have a pull down or up resistor?
if(digitalRead(but) == 1) This is looking for the button to be HIGH when pressed, so if you have a floating input (no pulling resistor), that would cause the flicker.

The button I have is that;