Alternate IDE (Part 1)
‘IDE‘ + something is one the most searched keywords on Arduinoos, while only two posts cover this subject. I may fulfill numerous visitors expectations with this new series of posts related to Arduino IDE.
There is strictly no reason why I should cover the basic use of Arduino IDE, while it has been very nicely describded in many places. One of my favorite being still Limor’s place but there are many of them that you will find with the help of good’ol google.
To my opinion, most apprentices will be happy with the standard IDE until they develop libraries or advanced sketches. As soon as your sketches exceed 200 lines or so, or when comes the time for getting rid of the standard Arduino functions and commands, programming becomes a head ache. So, what shall we do after getting an aspirin? Well, the Arduino guys nicely anticipated this situation and they included the option of an external code editor within Arduino!
Let’s open a well known friend! When opening blink.pde in the standard way, the Arduino IDE window shows up in this way
Now, in the IDE File menu, click on ‘Preferences‘ in order to display the eponym window,
and check the ‘Use external editor‘ box, validate with the OK button and the Arduino IDE window will now appear in this slighltly different way
See, the background color is now grayed, and disabled for typing. What you need to do now, is to open the blink.pde file in your favorite text editor. Mine is Notepad++, a very, very good freeware open source text (and more) editor.
In this text editor, change your code, and save it before compiling the code from Arduino IDE
Working simultaneously on sketches and libraries becomes easy now, thanks to the ability of Notepad++ to open multiple files and to split the screen in order to have a global glance at various code. The picture below shows the key files from the PlainFFT libraries opened all together, ready for modification/optimisation/debuging, etc.
Here is a trick for Notepad++. You can colour custom words, e.g. Arduino standard commands and functions: click on ‘Parameters‘ and select ‘Style configurator…‘. In the displayed window (as per the illustration below)
Select ‘C++‘ langage, ‘INSTRUCTION WORD‘ and ‘TYPE WORD‘. Add user key word in the text box and validate with the ‘Save&Close‘ button.