Controlling a relay

as far as I know, ther is no complete tutorial yet, but here is the schematic, which is posted in the Playground:

You can use the same code as you would use for driving an LED. Instead of connecting an LED and to the Arduino, you would connect the resistor and GND, as shown in the diagram.