Programming language directly with hardware

Asked

Viewed 1,967 times

1

I will make applications that need a direct connection to the hardware, for example a mini-Programmable robot that receives information from a sensor and sends to the programming treat and return the correct action to another board or circuit and etc. required according to each information received. What would be the ideal language? C?

2 answers

7


There is no more suitable language, at least not with this description.

There is one that solves the problem. If the hardware used does not accept code written in C, it is not suitable. The same goes for C++. In some rare cases you may only be able to make your application, or part of it, in Assembly of that hardware. It may be that the ideal or even unique language for that hardware is one that the manufacturer invented. It can be Java or C#, or who knows Lua. It also depends on the application. And it depends even more on which one you know and dominate.

No wonder the Lego Mindstorms NXT allows several languages, has even dialects. I imagine there must be very good libraries to access the hardware through most or all of them, but this is just one example.

Without knowing all this I pointed out and perhaps some things more difficult to say which is more appropriate. And one of these things only you can answer. Which one do you know well and will be pleased to use? There are political factors involved?

Anyone who says which language you should use is being biased.

  • http://programmers.stackexchange.com/q/84514/164719 &#Xa https://en.wikipedia.org/wiki/List_of_C-family_programming_languages

  • If I were he would use Portugol... :v uahuehaue

  • 1

    @Marcelobonifazio why certain answers have an expiration date. A lot of things changed from there to here. Of course C is the most used language in this area, but it is far from being the only one and not necessarily the most suitable one. I have no way of knowing. Go to default may be easier but doesn’t mean it’s going in the most suitable. PHP and JS also does, saw?

  • 1

    Someone disagrees and disagrees, pity we won’t know why.

  • Just to make it clear that it was not I who negatived rs, despite not agreeing 100%, there are points that I agree and some points that I do not entirely agree.

  • Another cool example would be, I turn off the monitor through the C or else turn up and down the computer volume and etc... it is possible this?

  • 1

    As I said, you can do anything in any language, as long as the hardware has the specific language and libraries well implemented. As the question is generic, I can’t say. Now you’re talking on computer, it’s something else.

  • Your answer is fine. But, not only your conclusion, but the acceptance by the AP just confirm to me that the question is based on opinions: "Anyone who says which language you should use is being biased."

Show 3 more comments

2

Maniero is right, but as you said "applications that need a direct connection to the hardware" face I would indicate low level languages, because this is a characteristic of them. This will depend on the system you use. For example: if using a PIC microcontroller, where resources are scarce, Assembly or C are the options. But if you are going to use a more robust system, equipped with microprocessor, with more resources, it becomes interesting to use high-level languages.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.