Using an H-bridge you can control a DC motor’s direction. Here I’m using the Texas Instruments L293NE. Setup and code can be found here.
Transistor Lab
Using a TIP120 transistor, we can control high-current DC loads. Here I’m using potentiometer to change the brightness of a incandescent light bulb that is powered by a 9V power supply. Setup and code can be found here.