4 * relay is connected across 5V relay through normally closed pins so that failure of arduino doesn't kill power to switch.
5 * to activate relay on this board, signal pin has to be pulled to ground.and coil draw is 76 mA when active
6 * board has pull up on input pin to it's vcc
14 pinMode(LED_BUILTIN, OUTPUT);
16 pinMode(RELAY_PIN, INPUT); // don't modify pin state
17 Serial.print("Relay pin on reset: ");
18 Serial.println(digitalRead(RELAY_PIN));
22 if ( Serial.available() ) {
23 char c = Serial.read();
26 pinMode(RELAY_PIN, OUTPUT);
27 digitalWrite(RELAY_PIN, LOW); // activate relay
29 digitalWrite(LED_BUILTIN, HIGH); // led on
30 } else if ( c == '1' ) {
32 pinMode(RELAY_PIN, INPUT);
34 digitalWrite(LED_BUILTIN, LOW); // led off