user83276: So i know that the native arduino language is written in c/c++, but does that mean that i can write pure c code in the arduino ide, or that i have to use the arduino specified language? I’m new to this and very confused, please bear with me here :’)

user7508: Yes, you can write in pure C. Some parts of the Arduino core API are
actually defined in C, e.g. pinMode() and digitalWrite() (at least
in the AVR core). So you can use them. Other parts, like Serial, are
C++ objects, and you will not be able to use them from plain C.
The Arduino IDE, however, will insist on you writing a file with the
.ino extension, that it will compile as preprocessed C++. You do not
need to put anything in that file though. If you want to write your
whole program in pure C, you can create an empty .ino file, and in the
same folder a .c file with your whole program. In that file you can
define your own main(). If you want to use the Arduino core API
though, you should instead define setup() and loop(), and rely on
the core-provided main().

83276: <p>So i know that the native arduino language is written in c/c++, but does that mean that i can write pure c code in the arduino ide, or that i have to use the arduino specified language? I’m new to this and very confused, please bear with me here :’)</p>
 7508: <p>Yes, you can write in pure C. Some parts of the Arduino core API are
actually defined in C, e.g. <code>pinMode()</code> and <code>digitalWrite()</code> (at least
in the AVR core). So you can use them. Other parts, like <code>Serial</code>, are
C++ objects, and you will not be able to use them from plain C.</p>
<p>The Arduino IDE, however, will insist on you writing a file with the
.ino extension, that it will compile as preprocessed C++. You do not
need to put anything in that file though. If you want to write your
whole program in pure C, you can create an empty .ino file, and in the
same folder a .c file with your whole program. In that file you can
define your own <code>main()</code>. If you want to use the Arduino core API
though, you should instead define <code>setup()</code> and <code>loop()</code>, and rely on
the core-provided <code>main()</code>.</p>
