Led dimming HELP

Hello,

im a beginner, and im currently trying to make a 12v led strip dimmer, using arduino, ive got a code which allows me to place a potentiometer from A0 and get the output from the 9th pin, but as far i know the arduino cant output 12v.

ive seen some people using a relay to get the 12v power from an outside source and still dim the leds, i dont get it, the relay doesnt work as a switch?

how the signal that allows the "diming" gets to the leds through the relay?

im sure im wrong or theres something missing.

Thanks

ive seen some people using a relay to get the 12v power from an outside source and still dim the leds,

Doubt you have. Can you post a link to this please.

You are right the Arduino can not output 12 V. You need to use a FET to act as a switch to get the strip lit. Then you need to apply PWM signals to the gate of the FET.

See this Usage | RGB LED Strips | Adafruit Learning System

Gabriel1919:
I don't get it, the relay doesn't work as a switch?

Actually, that is exactly what a relay is.