aubreybourke
aubreybourke

Reputation: 439

Java LED programming

Just wondering if there are any Java API's that enable you to control the LED's found on desktop/laptop cases?

Or, if not, is it at all possible?

Upvotes: 0

Views: 1952

Answers (1)

Madushan
Madushan

Reputation: 7468

If you're talking about the LEDs on the front that indicates the power state and HDD busy state, I'm afraid there's no way to play with them. AFAIK they are directly controlled by the controllers in the mainboard, and are not exposed to any software above BIOS.

If you want to plug in custom set of LEDs to your machine and control them with Java, then you can connect them to a serial or parallel port and use Java native methods (which essentially talk to C or C++ code) to control them. AFAIK, this is because the JVM doesn't have direct APIs to talk to underlying hardware. This can become quite tricky as Windows Vista and later requires a kernel mode driver to communicate with ports and are blocked for all user-mode software. So you C++ code should talk to kernel mode drivers.

Another way is to disconnect your LEDs from the PC and communicate via a custom protocol over WiFi or Bluetooth. As mentioned by @Makoto, you can use arduino or a similar board and communicate via either a wireless or a wired technology.

Upvotes: 2

Related Questions