Place a goto Main at the end, and change ["255"] to [255].
Code:Main: SerIn Si,4,[255],pinstate IF pinstate=1 Then GoSub Relayon Else GoSub Relayoff EndIF GOTO Main ' <-- forgot this Relayon: High RELAY Return Relayoff: Low RELAY Return
Place a goto Main at the end, and change ["255"] to [255].
Code:Main: SerIn Si,4,[255],pinstate IF pinstate=1 Then GoSub Relayon Else GoSub Relayoff EndIF GOTO Main ' <-- forgot this Relayon: High RELAY Return Relayoff: Low RELAY Return
Bookmarks