More general implementation; using PWM to make the segments illuminate more smoothly.
First attempt at lightsaber animation. Took a while to get it right. A delay of about 50ms between segments seems to give a nice, smooth movement.