This module creates and manages the 8 valves in the system.
Each valve has 1 input and 2 outputs.
The input (I2C) causes the valve to open or closes.
There is a GPIO output set when the valve is fully closed and fully open.
After each open or close command, the state of the valve is verified by waiting upon the valve to indicate that it is open or closed.
Classes
Members
VALVE_CLOSE_REQUEST: number
inner
constant
I2C value used to CLOSE the valve.
VALVE_DEFS
inner
constant
Definitions for all valves.
Properties:
VALVE_CLOSE_REQUEST: number inner constant
I2C value used to CLOSE the valve.
VALVE_DEFS inner constant
Definitions for all valves.
Properties:
Name | Type | Description |
---|---|---|
name |
string | Unique valve name. |
i2cPinOut |
number | I2C pin number used to actuate the valve. |
pinOpened |
number | GPIO pin number connected to open signal from the valve. |
pinClosed |
number | GPIO pin number connected to close signal from the valve. |
VALVE_OPEN_REQUEST: number inner constant
I2C value used to OPEN the valve.
Methods
close(name)
static
Close a valve by name
Arguments:
-
name
(string)
 Valve name
open(name)
static
Open a valve by name
Arguments:
-
name
(string)
 Valve name
start()
static
Initialize the valve driver and close it. 8 valves are created from initial values.
name
(string)
 Valve name
name
(string)
 Valve name