This tutorial will show you how to hook up a solenoid valve to an Arduino using a transistor and write simple code to control it.