Download this file
#include "relay.h"
#include "heater_controller_slave.h"

Relay::Relay():
  state(RELAY_OPEN),
  port(RELAY_PORT)
 {
  port.mode(OUTPUT);
  port.digiWrite(LOW);
 }

void Relay::close() {
  port.digiWrite(HIGH);
  state = RELAY_CLOSED;
}

void Relay::open() {
  port.digiWrite(LOW);
  state = RELAY_OPEN;
}

uint8_t Relay::get_state() {
  return state;
}
// vim:ft=arduino