Skip to content

Latest commit

 

History

History
 
 

java

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

☕ Java Driver

alt text

GitHub last commit

💬 Language

  • Java 11.0.10

📚 Required Libraries

📜 VaemDriver Arguments

  • String host - host IP for tcp/ip (ex. 192.168.0.XXX)
  • int port - TCP port number for tcp/ip (ex. 502)

Example Code

🚀 Start

  • Creates a new Vaem driver object (host IP, tcp/ip port)
  • Initializes and connects to the VAEM
  • Configures the 8 valve channels using the opening time values in valveData

image

♾️ Loop

  • While loop that repeatedly opens and closes valve 1
  • Reads the status of the VAEM after opening the valve
  • Waits one second between opening and closing, vice versa

image

🚧 Constructor

  • Creates a new Modbus Client with the given host IP address and port number
  • Sets the clients slave ID to "0"
  • Attempts to connect to the client

image

✔️ Initialization

  • Sets the operating mode of the device to 1 using a write operation
  • Reads back the current operating mode using a read operation
  • VAEM is fully initialized and connected

image

🧑‍💻Interface

  • configureValves(int[] openingTimes);
  • openValve();
  • closeValve();
  • readStatus();
  • clearError();
  • saveSettings();

Author

Name Email GitHub
Jared Raines [email protected] @rainesjared