This is a simple project to show how to connect a Raspberry Pi to a common relay. In this schematic, the relay is controlling a battery-powered LED.

I'm writing a blog post on this!