Need coding help with latching/bistable relay module