A basic sketch that controls the the trigger pulse of a triac-based AC dimmer.