-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPinch.cpp
More file actions
34 lines (27 loc) · 749 Bytes
/
Copy pathPinch.cpp
File metadata and controls
34 lines (27 loc) · 749 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
#include "Arduino.h"
#include "Pinch.h"
/********** PUBLIC FUNCTIONS **********/
/*
* Constructor for pump object. Then initializes the pins and initial pin states
*
* @param step_mtr_drv stepper motor driver/actuator/control pin
* @param step_mtr_dir stepper motor direction pin
* @param valve_input_drv input valve driver/control pin (valve1)
* @param valve_output_drv output valve driver/control pin (valve2)
*/
Pinch::Pinch(byte step_mtr_drv) {
pinMode(this->step_mtr_drv=step_mtr_drv,OUTPUT);
close();
}
/*
* Opens the Pinch Valve
*/
void Pinch::open() {
digitalWrite(this->step_mtr_drv,HIGH);
}
/*
* Closes the Pinch Valve
*/
void Pinch::close() {
digitalWrite(this->step_mtr_drv,LOW);
}