How do you increase the current of a pin output.

Hello.

I'm trying to increase the current of a Arduino uno. I know that a transistor can increase the current, but I don't know how. A circuit diagram would be much appreciated.

What are you powering/controlling and how much current do you need?

[u]Here is a MOSFET driver circuit[/u]. The higher voltage supply is optional so it can boost the voltage and/or the current.

This particular circuit is a "low side switch" which "sinks current" and essentially connects & disconnects the ground to the power the load on or off. (It's easier to build a low-side switch). If you have a non-inductive load you can leave-out the diode.

There are similar (but not identical) bipolar transistor circuits but MOSFETs are generally more efficient (they can handle more current without heating-up as much).

It's also possible to use a relay but regular electro-mechanical relays also require a driver. (You can get relay boards with built-in drivers).

I need around 30-40ma. Sorry for not mentioning

For small currents a BJT will work too, such as a 2N2222, see post #2 here: https://forum.arduino.cc/index.php?topic=566060.0

Are you sourcing current out of the Arduino output pin or sinking current into it? What device is the current going to?