Introducing Electron, a new IDE for Arduino

I love the Arduino platform. I have official boards and lots of derivatives. I love how it makes hardware hacking so accessible. But there’s one thing I hate: the IDE. It’s ugly. It’s ancient. It has to go.

Sure, I know why the IDE is so old and ugly. It’s a hacked up derivative of an older IDE, written in a now-deprecated UI toolkit. Fundamentally, the Arduino guys know hardware and micro-controllers. They aren’t desktop app developers. I suppose we should be happy with what we have. But I’m not.

My previous attempt

About two years ago I created a new IDE built in the same UI toolkit as the original (Java/Swing for those who are interested). It worked roughly the same but looked better. It had a proper text editor (syntax highlighting, line numbers), better serial port and board management, and a few inline docs, but basically worked the same; just some UI improvements.

I posted my new IDE on the Arduino forums and got almost no response. Pondering this for the past two years I realize this forum was the wrong place to launch a new IDE. The people there are experts. They are happy enough with their current tools that they don’t want to switch. They are experts. They don’t need all of the improvements that a better IDE could provide, like inline documentation and auto-library-installs. They are also more likely to simply use a general purpose IDE. I’ve done this myself and it works okay, but I’m still not satisfied. Arduino is special. It deserves better.

As the Arduino platform grows it needs a better out of the box experience. We have more and more novices hacking for the first time. We need an IDE that is truly top notch. Something that is custom built for Arduino, and the tasks that you do with it.

Some have asked me, “What do you want to do that the existing IDE doesn’t already?”. That’s a good question. If we are going to seriously invest in something new then we need some good reasons. Let’s start with the basics: installing libraries and boards.

Library management

Right now you find a library somewhere on the web, download the zip file, and unzip it into your ‘libraries’ directory. You do all of this outside the IDE even though you will be using it inside the IDE. Next you need some docs. There is no standard for the docs, but there’s probably something to read on the website you got the lib from. At least there are some examples. Oh, but they are buried deep inside a menu.

Now suppose it’s a month later and you are working on a new sketch. Do you remember all of the libraries you have installed? How do you search for them? Do you have the right versions? Do they work with all of your Arduino boards or just some of them.

It’s the year 2014. Why can’t the IDE just already know about the libraries out there. It should let you search for them by name or keyword. It should let you search through the example code. Once you find the library you need it should install it for you automatically. Where does it go on disk? Who cares?! That’s the IDEs problem. Finding and installing a library should be a single button click (or maybe two clicks if we are picky).

Board management

The many Arduino boards are listed in a nested menu, derived from the boards.txt file. This text file is only updated when the IDE itself updates, which isn’t very often, and the list isn’t comprehensive anyway. If the board you need isn’t listed then you have to add it manually, outside the IDE, duplicating the effort of other developers everywhere. Why can’t the IDE just fetch a list of all boards from the internet somewhere; a list updated by the actual vendors of those boards, so it’s always up to date.

This list of boards actually contains quite a bit of useful information, like how much RAM is in that board. However, this information isn’t actually shown anywhere. It’s only shown to the compiler. The IDE should give you full specs on your chosen board right on screen so you can refer to it whenever you want. Furthermore, the IDE should have extra board info like the number of pins, the input and output voltages, and if we are being generous an actual pinout diagram! All of this information is available on the web, just not in your IDE.

The IDE should just do all of this for you. Choose your board from a gigantic list downloaded from the internet. This list includes detailed specs on every known board, updated as new boards are made. You can refer to the board specs in a side pane, and even correlate the pins in your sketch with the pins on the board reference. This isn’t rocket science folks!

So you can see, there’s good reasons for a new IDE. This is before I’ve gotten to forward looking features like a built in Firmata client or data analysis tools. It’s time. Let’s build this.

Now for something completely different

Two years ago I tried by recreating the IDE in the same form. Now I want to do something different. I’ve started a new IDE completely from scratch, written in NodeJS and HTML. While it does use web rendering it won’t be a cloud based IDE. It will still run locally as an app, but using newer GUI technology than Java Swing. Don’t worry, you’ll have a proper app icon and everything. You won’t know it’s NodeJS underneath. It’ll just be a nice looking GUI.

Since it’s a back to basics effort I’m calling this new tool Electron, the fundamental particle of electronics.

So far I have basic editing, compiling, and uploading working for an Uno. I’ve also built a system for getting installing libraries and board definitions from the Internet using a git repo. This separate repo will contain a JSON file for every known library and board. Currently it has the basics from boards.txt and a few libs that I use, but more will come online soon. If you want to help, adding to this data repo is the easiest way to start. Pull requests welcome.

Electron IDE repo

Arduino Data repo

Here’s a rough screenshot. The GUI will greatly change between now and the 1.0 release, so just think of this as a guideline of the final look.

If you are a Node/HTML hacker please get in touch. There’s tons of work to do. Even if you are just an Arduino user you can help by providing feature requests and testing, testing, testing.

Thank you. Let’s bring Arduino development into the 21st century.