if it's different than the previous one... yes case not let us know. Don't forget it wait for analog variant on channel 0.

what about now if you skip this a/d stuff and do this change

Code:
main:
     for rainbowval = 0 to 255
          gosub rbgrainbow 
     next
     for rainbowval=255 to 0 step - 1
          gosub rbgrainbow 
     next

     goto main