LittleBigTech
LittleBigTech

Reputation: 157

Can you open and edit .c files in the Arduino IDE? And subsequently load them to an Arduino board

I have been trying to open c files in the Arduino IDE (which some people claim is possible).

I have not been able to do so.

How can I program the Arduino in c given that I have a project/files in another IDE? (for example, MPLABX)

Upvotes: 0

Views: 1128

Answers (2)

Codebreaker007
Codebreaker007

Reputation: 2989

There are two answers in one:

If you really want to use the ArduinoIDE you have to have a basic *.ino file having at least the defines and includes which are in the project file and the reqiured setup() loop() usually whats in main in c goes to loop() in ArduinoIDE. Thats the stoney path because there are some specific issues coming from the philosophy behind ArduinoIDE (help makers with little (no?) programming skills to get started quickly).

If you just need the Arduino tool-chain and want to work more comfortable you have two other options:

  • EclipseIDE with the Sloeber add-on. Download the Sloeber-AllInOne-Package for an easy start and THEN add the other modules you need (like for web development or similar)
  • PlatformIO an IDE for micro controller development - there is also a cloud based version for testing around.

All mentioned tools are real open source and available cross PC platform and not a gift from a company like MS for probably later lockin of devs

Upvotes: 1

Y. Shallow
Y. Shallow

Reputation: 51

I am not sure what you are trying to archive. Is it that you want to open it via the Arduino IDE or also compile the source code?

I am not aware of programming in bare c in the Arduino IDE. But if you're looking into using real c code, it might be a good time start either compiling and uploading via terminal yourself, or use an IDE which is suited for development with micro controllers.

I think you can tell the Arduino IDE to more elaborately log outputs. This would tell you exactly the commands the IDE is using (uses avrdude). Then you can use an IDE/Editor of your choice for coding.

Otherwise, have a look at eg. Atmel Studio. They also support Arduino.

Upvotes: 1

Related Questions