Controlling eletronic devices with JAVA ( LEDS, MOTORS...)

November 30

All this week I try to find some help about how to control eletronic devices like leds using the parallel or serial port using JAVA. Using C it's very simple, but with JAVA, I guess that NOBODY do this kind of application... If I'm wrong, please, tell me.... ( I know that I need to use javax.comm or JNI, but I want to see a real application that works ...



First thing to note is that using javax.comm you cannot set pin outputs
levels directly (you can set some pin levels directly such as CTS and
RTS on a serial port). There are ways around this such as writing the correct byte value to the parallel port (depends on port type though)
Therefore the device you wish to communicate with should be able
to talk to parallel or serial ports. If this is the case you just send
messages to the device and it lights up you leds.
A, perhaps better, solution would be to write, or obtain from the
internet, some native lib that allows bit bashing on the port of your
choice. Then write a wrapper class for it an call its methods (JNI).
This is only worth while if you have some reason to use java rather
then another language, such as C or C++, to talk to you device. This
whole thing would probably be easier in one of those languages.

View 3 Replies


  1. migo stock type
  2. Nokia 6120c midp certificate download
  3. badi or bte in sap afab transaction
  4. KE30 and SAP
  5. fb02 sales order
  6. bapi_po_create1 extension
  7. R90M
  8. 3HPL
  9. centers2k
  10. cardumj
Copyrights 2019 Fcffair BigData Resource, All rights reserved