F
@Samuel-Mathieson
Sorry for the late reply.
I didn't see your post before now.
If you still wonder about this, here is some hints.
The easiest way is to use a solid state relay or a transistor to PWM control the light.
DC LEDS (without any electronics) is the easiest.
For regular AC, you might want to use a current or voltage limiter instead.
This can be done with a MOSFET, a capacitor and a few resistors.
There are many (other) solutions.
Right before I was about to press send, I did a quick search for PWM AC dimmer, which gave me results such as:
http://www.instructables.com/id/safe-and-simple-AC-PWM-Dimmer-for-arduino-Raspberr/
I hope this helps.