result var word loop: dir7 = 1 ' set pin 7 to output high 8 ' charge the capacitor pause 10 ' wait for it to charge rctime 8,1,result ' do the RC timing freqout 7,10,result * 3 goto loop