'{$STAMP BS2} '------------------------------------------ 'testll.bs2 ' 'This program tests the light sensor hardware 'by constantly reading the sensor and displaying 'the results to the debug window. lightl var word 'Light Level start: gosub getll 'Get light level debug ? lightl 'Display result pause 1000 'Wait 1 second goto start 'Loop forever '------------------------------------------ 'getll 'Reads the light level and sets variable lightl getll: high 4 'Discharge cap pause 1 'Short delay rctime 4,1,lightl 'Capture light level return 'Done