'Light House 'Connect pin 6 to base of 2N2222 transistor 'Connect Emitter on transsitor to Vss 'Connect single Christmass light to Vdd and Collector of transistor dim x dim speed 'Set up PWM signal hwpwm 1,255,1 output 6 speed = 15 loop: for x = 20 to 150 step 1 hwpwm 1,255,x pause speed next for x = 150 to 20 step -1 hwpwm 1,255,x pause speed next hwpwm 1,255,0 for x = 20 to 150 pause speed next goto loop