symbol MID_LEVEL = 180

dirsB = 255

main:
    if pinC.1 = 1 or pinC.3 = 1 then
        pinsB = %00000000
    else
        readadc 8, b1
        if b1 > MID_LEVEL Then
            pinsB = %00011000
        else
            pinsB = %01000010
        end if
    end if
    goto main