Skip to content

pascaltippelt/ArduValve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages