Hello again,
So I am thinking . . . you get your adc result and store it into a variable . . . . call it smartie, just because I never liked using dummy.
So then give your pulseout variable a different name . . . say we call it value.
then use a for next loop
For value = 0 to smartie
pulseout pin value
pause 10
next value
Just my thoughts . . .