Is there a compiler that I can use to run C on an arduino or any other way so that I can upload C programs to my arduino?
-
What do you mean by "run C"? You can just compile them into your sketch.Comintern– Comintern2015-04-08 22:49:53 +00:00Commented Apr 8, 2015 at 22:49
-
How can I do that? I'm not very familiar with arduino software.Benichiwa– Benichiwa2015-04-08 22:50:56 +00:00Commented Apr 8, 2015 at 22:50
-
2You basically do that every time you compile a sketch. The Arduino compiler is C++, which is backward compatible with C for the most part.Comintern– Comintern2015-04-08 22:52:57 +00:00Commented Apr 8, 2015 at 22:52
-
!!!* :-)Russell McMahon– Russell McMahon2015-04-09 16:11:48 +00:00Commented Apr 9, 2015 at 16:11
1 Answer
Perhaps you should look into here https://github.com/arduino/Arduino/wiki/Build-Process
Arduino uses avr-gcc compiler. Basically, it is a C compiler.
There is an step by step on how to customize this process using an avr-gcc compiler of your own here http://www.wikihow.com/Write-Arduino-Software-in-C
But I best recommend you downloading the arduino IDE on the official website to get things going. It has all the serial pairing stuff you don't really need to know to get started.
Hope it helps.
-
GCC is a C++ compiler? Anyway, most/any C++ compiler can compile C-code as C is basically a subset of C++ (Don't quote me on this though, it'll work, but it's not that trivial)aaa– aaa2015-04-10 09:46:46 +00:00Commented Apr 10, 2015 at 9:46