-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathValve.h
More file actions
37 lines (31 loc) · 728 Bytes
/
Valve.h
File metadata and controls
37 lines (31 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//valve.h
#include <string>
#include "/home/pi/bcm2835-1.50/src/bcm2835.h"
#ifndef VALVE_H
#define VALVE_H
using namespace std;
class Valve
{
public:
//when we don't care if it worked
Valve(string name_arg, //human readable
bool normal_open, //valve type
int port_number); // port on the box this valve is on
bool is_actuated();
bool is_open();
bool open_valve();
bool close_valve();
bool actuate();
bool deactuate();
//getters
string get_name();
bool get_normal_open();
int get_port_number();
private:
bool is_normal_open;
bool actuated;
string name;
int port_number;
RPiGPIOPin bcm_pin_actuate;
};
#endif