maybe i have a idee,
my Project code is to big and to private to post it here.
maybe i can send it to u by email, where u can see inside the code where to put the relay on and off .
i think this will helpfull and to better understand for u, if u want help me with this
regards,
edwin