How can i run C code in Arduino ?


Joined Oct 15, 2009
Can you be a bit more specific?
Are you just saying you want to write code in C and not use the Arduino IDE?

Or are you wanting to write programs and not have to use the setup and void loops?


Joined Dec 13, 2013
the arduino does not have the memory to hold a run time c program. the probrams are compiled so they actually run in machine language of 1's and 0's which takes much less memory.c is like basic and other languages, made readable to humans, but very seldom to processors.


Joined Feb 19, 2010
You can not because Arduino can not.

Arduino language is C like, but IT IS NOT C.
Either rewrite your C code or find someone to rewrite it for you.


Joined Feb 19, 2010
People, people, people...

The problem is not the microcontroller. Yes, it is ATMega 328 with a bootloader.

The problem is the ability to load code into the ATMega 328. That is why the dude is using Arduino board and Arduino environment. But since both parts are Arduino, it needs to be in Arduino language. Which the dude is not willing (yet) to invest any time into. So the dude has two choices:
1) rewrite the code
2) buy/build/steal hardware to load code into ATMega 328, buy/steal ATMega 328 chip or chips. But that just the microcontroller chip, you still need the rest of the circuit that goes around the microcontroller, like: clock crystal, capacitors, resistors, RS232 chip, etc., it is eFFING easier to just buy Arduino board and rewrite the C code.


Joined Feb 19, 2010
From the website:

"To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing."

"and people wanting to understand the technical details can make the leap from Arduino to the AVR C programming language on which it's based. Similarly, you can add AVR-C code directly into your Arduino programs if you want to."

Well. I did find how to load C into Arduino Uno: So I guess OP's problem is solved.


Joined Aug 21, 2008
Yes, to program an AVR controller without the bootloader you need an inexpensive programmer. Software for the programmers are free and widely available.


Joined Sep 13, 2015
The simplest would be to write your C code in the arduino ide and compile it and upload it to your arduino.

Nothing else is needed.