pascaltippelt / ArduValve

Arduino Library to control electromagnetic valves

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ArduValve

Arduino library to control electromagnetic valves, for example in the garden.

#include <valve.h>

Valve v = Valve(D4);

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:
  v.setState(CLOSE);
  delay(1000);
  v.setState(OPEN);
  delay(5000);
}

Methods:

Valve(int pin);             //declare a new valve.
bool getState();            //get the state of the valve (OPEN / CLOSE)
void setState(bool state);  //set the state of the valve
bool getMode();             //get the mode of the valve (AUTOMATIC / MANUAL)
void setMode(bool mode);    //set the mode of the valve

About

Arduino Library to control electromagnetic valves

License:GNU General Public License v3.0


Languages

Language:C++ 100.0%