How to compile arduino code on Arduino IDE


My problem is simple I want to modify the arduino code in order to add some sensors and a closed loop control. I have read a lot of topics in the forums explaining that you can modify the arduino code using Cloud9 or by ssh connection, but both alternatives don´t provide a way to correct the errors of the code. I have a question to the people that modify the code.

If I want to add or modify the existing code, How do you debbug the errors of the code?

Do you use an Arduino IDE to compile/debbug the code on the Beaglebone and then you upload the arduino firmware on the Atmega 2650?

Or what is the procedure that you use. I think an explanation of this topic would be heplful for the people that try to modify the code.

I´m very glad if you can answer.


My workflow with the Atmega 2560’s firmware code has been to

  1. Use my favorite code IDE to work with a local copy of the code.
  2. Make all of my changes and then point the Arduino IDE to that same folder to ensure it will compile correctly before
  3. Pushing the changes on the the beaglebone black for deployment to the Atmega 2560.

I’ve not played with the 1.6 version of the Arduino IDE yet, but all of the prior versions have all kinds of usability issues with a large set of files which is why I use a different editor.


Thank you for the answer, but I don´t understand very well points 2 and 3.

What does it mean that you point the Arduino IDE to that same folder to ensure it will compile correctly before?

And how can you charge the modifiyed local code to the beaglebone?

Best Regards


To get a local copy of the code:

  1. I do a git clone of the Arduino code to my local computer:


  1. I change the permissions on the Arduino folder on the beaglebone and use the Samaba network share to connect over the network and change the files. [solved] Problem with uploading new arduino software


Ok, I downloaded openrov-software-arduino and unzipped the code in my computer. So I was thinking about how to proceed and I want to know your opinion. For example I´m planning to do the following:

  1. Modify and compile the code in my windows computer using Arduino IDE or another IDE.

  2. Then, in order to charge the modifications on the Beaglebone I want to copy the local new code from Arduino IDE and paste it in the Cloud 9 IDE. And save the modifyed files in Cloud 9.

  3. Finally, upload the arduino firmware using the Cockpit.

Is this procedure correct?



Hi Brian,

I hope you can tell me if the programming procedure described in my last reply is correct.

I´d be very thankful if you can give an advice.


Yep @Jorge_Said, that should work. Cloud9 is apparently broken on recent versions of the image, so that might cause a problem, but conceptually your correct.

The work around is to ssh on to the ROV and use the sudo pico <filepath/filename> which uses a built in text editor to manually apply the changes. Sorry for the inconvenience, I’ll take a shot at either rolling back or fixing the current issue tonight.