-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95c46aa
commit 0c3055a
Showing
2 changed files
with
46 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,32 @@ | ||
|
||
void setAirPressure(int channel, float value) { | ||
// takes channel number and pressure | ||
//analogWrite(); | ||
airPressure[channel] = value; | ||
analogWrite(airRegulatorPins[channel], map(value, 0, 1, 0, 255)); | ||
} | ||
|
||
void setWaterPressure(int channel, float value) { | ||
|
||
waterPressure[channel] = value; | ||
analogWrite(pumpPins[channel], map(value, 0, 1, 0, 255)); | ||
} | ||
|
||
void waterValve() { | ||
|
||
void openWater(int channel) { | ||
waterValveOpen[channel] = true; | ||
digitalWrite(waterValvePins[channel], HIGH); | ||
} | ||
|
||
void closeWater() { | ||
|
||
void closeWater(int channel) { | ||
waterValveOpen[channel] = false; | ||
digitalWrite(waterValvePins[channel], LOW); | ||
} | ||
|
||
void openAir() { | ||
|
||
void openAir(int channel) { | ||
airValveOpen[channel] = true; | ||
digitalWrite(airValvePins[channel], HIGH); | ||
} | ||
|
||
void closeAir() { | ||
|
||
void closeAir(int channel) { | ||
airValveOpen[channel] = false; | ||
digitalWrite(airValvePins[channel], LOW); | ||
} | ||
|
||
|