Changed from Switch/case to if/elseif to save some runtime ram
For information on installing libraries, see: http://arduino.cc/en/Guide/Libraries