Master dimmer dmx channel code help

or lack of comments yeah let me fix that and come back with those and a better explanation of what I'm trying to do