Library-ized.

This is the working implementation of the LEDsensor "library"