0

I have taken interest in basic hardware interaction with software.

What's a good language to start learning to control hardware? Can Java do the job?

Jomar Sevillejo
  • 1,648
  • 2
  • 21
  • 33

2 Answers2

4

As others have suggested, C or C++ is the "Proper" way to start as interacting with hardware can be done very directly due to the pointer structure (You can access arbitrary memory adresses).

If you haven't used C or C++ before i would suggest that you tried an arduino board as it would give you the feel of the C syntax and at the same time give you a very well documented board to play around with.

http://arduino.cc/

You should even be able to interface to the board in Java and C#

http://playground.arduino.cc/Interfacing/Java http://playground.arduino.cc/Interfacing/csharp

Sigurd V
  • 5,077
  • 4
  • 18
  • 27
  • Thanks! I have ample experience in C and C++ I will check on arduino, and seems like a really good way to starter knowledge. :) – Jomar Sevillejo Jul 19 '13 at 04:36
2

This depends on the platform. If you have a good java API for your device, it works well enough. In general though C or C++ are the languages of choice when it comes to hardware. The reason for that is that they are able to directly access arbitrary memory addresses through the pointer construct. This is in most cases the way to interact with hardware. This is not directly possible in java.

Jakob
  • 2,360
  • 15
  • 21
  • Actually, on most multitasking operating systems it is discouraged or even prohibited for user mode programs to directly access hardware. And on many modern computers, there's limited hardware or ability to add hardware which utilizes memory-mapped I/O anyway. Something hanging off a USB bus is going to be API-based; but what is running in the embedded system on the other end of the USB may very well be compiled from C. – Chris Stratton Sep 08 '13 at 14:50