With the code you have posted, you set high gpio.5 when w1 is 24 and gpio.1 when w1 is 51 then you go to label start and you set gpio to 0, this is why relay flickers
Code:
start:
gpio=0
serin GPIO.2,N2400,["pl65"],w1
if w1=24 then gpio.5=1
if w1=51 then gpio.1=1
'if w1=90 then gpio.4=1
'if w1=36 then gpio.0=1
pause 500
goto start
Set gpio=0 to the begining of your code, in such a way that is executed at start up only once, than use a condition like :
Code:
if w1=25 then gpio.5=0
if w1=52 then gpio.1=0
to switch off your relays.
Al
Bookmarks