Using Java to control Hardware

Looking for ways to use Java programming language to control hardware stuffs? Looking for ways to control electronic devices, interface to system or monitoring sensor status?

Most people think that Java being a high level language would not be able to control low level hardware stuffs.

Can Java programmers control hardware automation lighting, door access, motor motion and main power switch On/Off?

Can you use Java to monitor hardware sensors, check temperature/humidity, detect poisonous gas, or check noise level?

The answer is of course yes!!! Why not?

 

Java is by concept forbidden to have direct access to hardware for the reason of security. Most hardware control is via the operating system like WinOS, Linux or Macintosh. While Java has restricted access to hardware, communication via data stream is available. The means of communication opened up the gateway for Java to control hardware.

Network communication is one popular and well known communication means which Java is very good in. It is possible to use network communication to control other electronic hardware. TCP/IP or UDP is two of the most common low level network communication via the Ethernet or WiFi. You can send low level data to directly communicate with the hardware, to control devices and to read sensor status. Data stream can be interpreted as bytes and be processed just like low level processing.

The next most popular communication means in the hardware world is the serial communication (serial com). Examples of these are RS232, RS485 or RS422. It is a low level hardware communicate still commonly used today in most electronic hardware design. The serial communication itself is a low level hardware access. The standard Java SDK do not includes the means to allow access to serial com, but there are libraries available written through JNI (Java Native Interface) which allows Java programmer to write communication data stream for serial com. You can communicate directly with electronic hardware that uses RS232, or virtual com port (virtual port create from USB port). However the use of JNI can means that your Java code will not be easily portable.

With the advancement in technology and communication methods, more and more support will be available from Java.

  • Bluetooth
  • NFC (Near Field Communication)
  • Zigbee/Xbee (Peer to Peer communication)

Check out the following I/O Controller products which enables Java programmers the power to control electronic hardware.

I/O Controllers for Java

I/O Controllers from IOanyThing allows control directly from a Java program. Source code examples, API library in Java and other languages are available to help programmer to have a quick start in their development work.

For network base hardware I/O controller, the Ethernet IOaT-E series will be the controller for your Java network programming.

For self powering, small scale, short distance devices, check out our USB I/O controller IOaT-U series.

The models available from IOanyThing,

Ethernet I/O Controller series

USB I/O Controller Series

IOanyThing Products

IOanyThing design hardware interface product, empowering you to control any electronic gadgets or system using any programming languages that you enjoy programming. Check out our website for further details in customising a controller specially for your application use.
We can help you to connect any electronic hardware stuffs.