Auto Intensity

Anyone know what’s the code for it?Please someone help me…
This project is all about controlling the brightness of your light whenever you want to. You can on and off too.

Please respect my post .Thank you

The code will depend on the type of light and hardware that you’re using to dim the light.
Is this a ‘dumb’ bulb that’s being dimmed using some sort of dimming hardware - a MOSFET for example. Or, is it some sort of smart bulb that’s controlled through software - a WEMO or Ikea TRÅDFRI for example?