keep rest of the code in , just set in configuration.h LASER_PWM_MAX 4095
and in Customevents.h
#define FEATURE_I2C_MACROS false
#define FEATURE_EXT_PWM false
#define FEATURE_PWM_LASER false
#define FEATURE_ANALOG_LASER true
#define GAMMA_CORRECTION true
as you are using due/radds you have to use level shifter to get from 3.3V to 5V and keep in mind that I2C wiring is
critical , so keep wires as short as any possible