17

I would like to start to play with Arduino.

I've read that C and C++ are the official languages but I've also found other way to communicate using Python or Java for example.

Which programming languages are supported to program Arduino?
Are there any limitations using Python or Java?

systempuntoout
  • 545
  • 3
  • 5
  • 12
  • For questions about Arduino programming, please see the [StackExchange board dedicated to Arduino](https://arduino.stackexchange.com). – Nick Alexeev May 21 '19 at 16:29

3 Answers3

14

My advice, stick with the C++ derived Arduino language or use raw C/C++. It's ideally suited to microcontrollers. But, if you like esoteric languages:

Toby Jaffey
  • 28,796
  • 19
  • 96
  • 150
  • I've read that when you buy a shield, it is typically shipped with a C library which is used to interface it with the arduino program. Can these libraries be imported also in those proposed esoteric languages? – systempuntoout Apr 28 '11 at 18:49
  • 4
    With some porting work, yes. For interpreted languages, you could port the shield's driver into the interpreter and add calls. For a compiled language, you could add the shield's driver to the runtime. – Toby Jaffey Apr 28 '11 at 19:00
8

you can use the language that you feel more confortable, then you can look for a way to compile in arduino code machine. For example I use Go Lang and I use gobot.io to do it working...

Exist Cylon.js if you want to program in JavaScript or Artoo for Ruby developers.

Actually C is the most common because the IDE of arduino work with it.

1

You are a bit confused. I would stick with the c/c++ arduino enviroment for the arduino. Java, Python, Processing are used on the pc to run communications with the arduino, they are not laguages for the arduino. One limitation for them is that they do not run on the arduino.

russ_hensel
  • 2,904
  • 16
  • 12
  • 8
    I think it may be you that is confused. The arduino doesn't run interpreted code, it's compiled. Code can be compiled from any high-level language that has a compiler for the hardware. – brianary Jan 04 '13 at 18:35
  • I second @brianary, this answer is wrong and should be un-accepted to avoid confusing readers. Microcontrollers run compiled code just like microprocessors, any high level language can be used if someone took the trouble of making a compiler for your platform. Some languages like Java and python are not necessarily compiled and may require an interpreter, but as a standard program someone may have made one for your platform. – Mister Mystère Aug 31 '15 at 07:23
  • Who said the arduino runs interpreter code. Of course the arduino can run any language there is a complier for, but it can interpret any code that someone bothers to write an interpreter for it. I have not researched this. I just recommended sticking with the standard c/c++ enviroment, and noted that with communications the pc could run a "pc language". – russ_hensel Sep 01 '15 at 15:22
  • "if someone took the trouble of making a compiler for your platform". the key answer. Unfortunately the Arduino environment is C/C++ – Gabe Nemeth May 21 '19 at 14:16