SparkCore code to control a two channel relay using the spark function api