Quote Originally Posted by mikebike View Post
No, didn't help:

ERROR Line 30: ELSE without a matching IF..THEN. (ADC1.pbp)
ERROR Line 32: ENDIF without a matching IF..THEN. (ADC1.pbp)

That would suggest that they should all be on the same row, but that was my first attempt.
Code:
loop2: 
ADCIN 0, involt 'Read channel 0 to involt
PAUSE 100 'Wait 100 ms

IF involt >= 128 THEN 
  GPIO.5 = 0 
ELSE 
  GPIO.5 = 1 
ENDIF

GOTO loop2
END
Alain