Option Explicit dim potVar as Integer dim redLed as byte dim greenLed as byte Public Sub Main() redLed = 11 greenLed = 12 do potVar = getADC(13) debug.print cStr(potVar) 'optimize incoming numbers for flashing routine call putPin(redLed,1) call delay(cSng(potVar)/500.0) call putPin(redLed,0) call delay(cSng(potVar)/500.0) 'create 2 ranges from incoming numbers ' if (potVar > 0) and (potVar< 500) then ' call putPin(redLed, 1) ' call putPin(greenLed,0) ' else ' call putPin(greenLed, 1) ' call putPin(redLed, 0) ' end if loop End Sub