This is what I have changed it to and now it doesn't work at all.
.h
class Relay
{
public:
Relay(int pin, bool kind); //kind 1 is positive on kind 2 is negative on
void begin();
void on();
void off();
int pin;
bool kind;
private:
};
.cpp
Relay::Relay(int pin, bool kind)
{
}
void Relay::begin(){
pinMode(pin, OUTPUT);
}
void Relay::on(){
if (kind=true){
digitalWrite(pin, HIGH);
}
else if (kind=false) {
digitalWrite(pin, LOW);
}
}
void Relay::off(){
if (kind=true) {
digitalWrite(pin, LOW);
}
else if (kind=false){
digitalWrite(pin, HIGH);
}
}