The basic Arduino IDE lacks a lot of the sophistication present in other IDEs such as code completion, code collapsing, folder organisation, etc. Are there other IDEs that allow programming in C or C++ and improve on these aspects?
There is an Arduino Eclipse plugin named sloeber! And Eclipse is an awesome cross-platform open-source IDE!
Visual Micro provides a full build system with debugger for Arduino in Microsoft Visual Studio. For advanced users it also allows the underlying Arduino source code to be viewed or modified, enabled projects and/or libraries to be edited from any location and shared in multiple projects alongside true cross-platform intellisense.
For more go to The Official Arduino Site
For development on Windows, there is a special edition from Arduino official IDE called arduino-erw, This edition much better the last one because it fixed a lot of lagging and stability issues!
Expanding on Fake Name's answer, there is also Visual Micro's Arduino plugin for Atmel Studio (built off Visual Studio). It shares the tools, sources and libraries with the Arduino IDE but provides all the code completion and other features of Visual Studio.
The Visual Micro plugin also works in all versions of Visual Studio. Provides Arduino usb debugging and an Arduino IDE compatible Board Manager.
Grant Lucas produced a great write-up on getting your environment situation squared away:
Here's a quick post on setting up Vim for Arduino development instead of using the Arduino IDE. If you're a heavy Vim user, it can be a bit of a shock to go into a different editor. Thankfully the setup is pretty easy to get this all working with Vim. This post is assuming you are comfortable with how Vim is setup and ideally already have an environment that works for you.
Install the Arduino IDE
Wait. What?!? I hear you say. I know, I know. We're not actually using the Arduino IDE but we need it for some configuration and the files it installs. The Vim plugin we'll be using ties into what the IDE installs and configures so it's needed. You can download the IDE from the Arduino site.
Install vim-arduino plugin
To get the main goodness of compiling, monitoring and deploying to an Arduino, grab the latest version of vim-arduino. Install it in your .vim folder using what ever method you use to manage your Vim plugins. Hint: I'd recommend Pathogen as it makes installing as simple as dropping the plugin folder into a bundle folder.
Vim syntax file
Next up is to get the syntax file so we can have nice colour coding for .pde and .ino files. Download the latest arduino.vim and install it in your Vim syntax folder. To get the syntax to apply to the correct file types add the following to your vimrc file
au BufRead,BufNewFile *.pde set filetype=arduino au BufRead,BufNewFile *.ino set filetype=arduino
Configuring the Arduino IDE
Before trying to compile and deploy with Vim, get it all working with the Arduino IDE first as the Vim plugin just calls from the settings saved by the IDE. If it's working in the IDE, it should work in Vim. Make sure you select the right tty.usbmodem* serial port from Tools > Serial Port in the IDE. Note: This will only show when the Arduino is plugged in.
Working from Vim
Once you can communicate with your Arduino from the IDE you should be fully good to go with Vim. You shouldn't have to open the IDE unless you want some example code. Open up your sketch file in Vim and use
<Leader>acto compile a sketch,
<Leader>adto compile and then deploy to the connected Arduino and
<Leader>asto open a new window with
screento monitor the serial output from the Arduino.
You can use AVR Studio to write programs for Arduinos.
There is a plugin that lets you link against and use the arduino libraries from within Atmel Studio.
If you've used Microsoft Visual Studio, Atmel Studio is basically a reskin of Visual studio with different compiler backends that target the ATmega series of devices, so you'll feel right at home.
There is a half way solution as well since the Arduino IDE has support for external a editor, then the Arduio IDE just compiles and uploads.
Now you can use whatever IDE/editor you like to edit the code, and then you switch back to the Arduino IDE to press the compile and upload button when you are done.
One rather good IDE extension is the Arduino Mode for Emacs. It allows using a highly versatile and extensible IDE such as Emacs for writing, compiling and uploading code to the Arduino.
The documentation and instructions can be found here.
UPDATE-> Codebender is being shut down.
There is a brilliant open source, web based IDE called Codebender
It is like Github for Arduino and has a great community working from it with thousands of examples and the dev team are exceptional.
With codebender, you can:
- program an existing sketch to your device
- clone an existing sketch
- modfy it to your needs
- share your work with the world
- embed code in your website, blog, or tutorials
Cross-platform Works on Windows, Mac & Linux, Firefox & Chrome
Codebender supports Windows (from Windows XP up to Windows 8.1, yes, even Vista :P), Mac OS X 10.6-10.9, and Linux and works within all major browsers
In addition to the mentioned IDEs you can use Xcode with embedXcode if you use a mac. The IDE has a great file structure and support for a lot of boards. For big and complex projects it is really good. I like to use vim or the arduino IDE for simpler and less complex sketches/projects.
There is one from Brazil called MariaMole: http://dalpix.com/mariamole
According to the author, like the original Arduino environment, the MariaMole facilitates the creation of software for the Arduino. However, while the original Arduino IDE has limitations to make life easier for beginners, MariaMole brings features that more advanced users are accustomed to find in professional IDEs, such as:
- Runs over Arduino install
- Workspace support multiple projects at the same time
- Multiple serial port consoles at the same time
- Files use open-formats
- Building process configurable
- Imports Arduino examples and sketches
- Easily import Arduino libraries
I have always wanted to use Eclipse, since that is our standard (for Java) at work. But I never managed to get the debugger working with my AVR Dragon board - just too many layers between the source code and the chip. So I am back to using Atmel Studio. You can set the keyboard mapping to emulate various other IDEs (including Eclipse and Netbeans). I can accept the Microsft quirkiness in return for a stable debugging environment, multi-file support and professional source control features.
I like both of them:
- Atom has various useful built-in features and over 6,000 packages (which can be easily downloaded and installed from the settings pane) allowing the user to add essentially any feature he needs.
- PlatformIO is a powerful IDE for microcontroller programming. It has all the features of the Arduino IDE (like the ability to upload code to an Arduino board with one single click, a serial monitor, ...) plus many others (like all those listed by the OP) and perfectly supports Arduino. Besides "it supports more than 200 development boards along with more than 15 development platforms and 10 frameworks". It can be natively installed either on GitHub's Atom either on Microsoft's VSCode code editors.
I still use PlatformIO on Atom on a regular basis, but I just saw on their website and forum that they are discouraging users from using their Atom package while proposing PlatformIO in VSCode as a better alternative. The Atom version still works well, but if you are changing your editor and want to try PlatformIO I would suggest to follow their advice and install it in VSCode.
Clion + PlatformIO
Clion because I love the jet brains IDEs. As a student or teacher you can get a free licence. And I have been told by suspicious people on the internet that there are other ways of obtaining a license (not that I would advice on doing anything like that).
PlatformIO is quite powerful and integrates well into almost any IDE. It's easy to declare dependencies to other libraries which are automatically downloaded.
I am also using the Clion serial port monitor plugin to communicate over
With this setup you can completely ditch the old Arduino IDE which I found to be quite satisfying!
This is the new “Code View”! It lets you write your code directly inside Fritzing, and even upload it from there to your microcontroller. It even has a serial monitor. :)
Normally known as a schematic builder, Fritzing has a built in IDE.
See here for more.
Haven't seen anyone mention it yet, but I use VisualMicro for Microsoft Visual Studio (not Atmel), and I like it just fine. It gives you everything you'd normally have in Visual Studio, like intellisense typing. The trial version is the full program, and the license is pretty cheap- like 30 bucks or something. I got my work to pay for a commercial license key. Do recommend!
A good alternative to the Arduino IDE is Visual Studio Code in combination with the Microsoft extension for Arduino https://github.com/Microsoft/vscode-arduino
It gives all the features of the Arduino IDE such as
Verify and upload your sketches in Visual Studio Code
- Built-in board and library manager
- Built-in example list
- Built-in serial monitor
but additionally to offers some attractive features:
- IntelliSense and syntax highlighting for Arduino sketches
- Snippets for sketches
- Automatic Arduino project scaffolding
I use Eclipse and Sublime Text for editing Arduino code, and I build in the Arduino IDE with it set to "external editor" mode, or using the Arduino Command Line tools. Eclipse has a fantastic indexer and makes understanding the Arduino core much easier. I've written a detailed PDF about using and setting up Eclipse for professional software development, incl for Arduino, here: https://github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/blob/master/eclipse/Eclipse%20setup%20instructions%20on%20a%20new%20Linux%20(or%20other%20OS)%20computer.pdf.
Note that I'm using regular Eclipse for C/C++, with no Arduino plugins. I don't find them that useful since they can never seem to keep up with the latest Arduino build tools anyway.
See my document for full setup information in general.
My go-to choice (pun, that's only a pun, folks!) is Sloeber - Eclipse with Jantje's EclipseArduino plugin. Having decades of emacs muscle-memory-training, I use MulgaSoft's Emacs+ plugin with it, switching to real GNU emacs for the heavy lifting - as developing a project and new libraries for it in parallel, f/ex, and use Sloeber to catch my typos & brain-f*ts.
In late 2019 we have the Deviot Sublime Text 3 plugin that runs on top of PlatformIO.