Logo

Retro computing with a touch of modern and the home for all things, retroCombs (aka Steven Combs).

Disclosure Statement: When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to Amazon, the eBay Partner Network, and/or others.

11 January 2014

HOWTO: Sublime Text Arduino programming IDE on Peppermint OS

by Steven B. Combs, Ph.D.

In a previous post I demonstrated the install of the Arduino IDE on a Peppermint OS 4 install. Today I want to take this a bit further and show you how to create an Arduino programming environment that knocks the socks of the original Arduino IDE.

Before you begin, you must have Java and the official Arduino IDE software installed on your Peppermint OS box. Directions are here. Once that process is complete, click the link below to learn how you can use Sublime Text 2 and a package known as Stino to upgrade your Arduino programming environment.

I will use Peppermint OS; however, these instructions should work with most Debian based Linux distributions.

Why use Sublime Text 2 and the Stino package?

I will not go into a long rant on why Sublime Text 2 is my go to text editor on both Linux and Mac. A quick Google search will yield many blog posts that handily take care of this task. Quickly though, Sublime Text 2 includes features that the original Arduino IDE simply does not, such as:

That last bullet, packages, is the vital component. It allows us to add additional features to the base install of Sublime Text 2. The Stino package simply adds the controls we need to write, compile and upload our code to an Arduino.

You can also configure a Mac with the same setup. My first use of Sublime Text 2 and the Stino package was on a Mac and the install is similar. Seasoned Mac users will be able to complete an install with relative ease. If there’s a need for a Mac version of this post, drop a comment below. And “yes,” this same setup can be accomplished on a Windows box. Please don’t ask me for instructions though. I haven’t had access to a Windows machine in over three years.”

Install Sublime Text 2:

The heart of our new enhanced Arduino IDE is Sublime Text 2. As the time of this writing, a beta version of Sublime Text 3 is available. These instructions will not work for this version; however, savvy Linux users can probably modify my instructions to get a functional install. Let’s begin and install Sublime Text 2 on Peppermint OS.

Peppermint OS will search for all dependencies and software necessary for the install.

Some seasoned Linux users may wonder why we don’t need to install repositories (or server locations that contain the software). Peppermint OS already includes them! Yet another reason Arduino fans should consider Peppermint OS as their Linux distro of choice.”

Load Sublime Text 2:

Let’s verify our install of Sublime Text 2 and make sure things are operational.

Those familiar with basic text editors will find Sublime Text 2 familiar. The lack of icons and buttons may confuse new users. Hang in there and trust me. Once we get those Arduino controls in there, it will all begin to make sense.

“If you are curious about Sublime Text 2 usage and features, let me suggest this series of videos.”

Install the Sublime Text Package Manager:

Now that we have a functional Sublime Text 2 install, its time to make it Arduino aware. We utilize the package feature of Sublime Text 2 to do this. Natively, Sublime Text 2 does not include a package manager; however, the folk(s) over at https://sublime.wbond.net have created the standard in Sublime Text package managers.

Package Manager makes it easy to add other features to Sublime Text 2 as you become more comfortable with its use in other activities besides Arduino programming.

Install the Stino Arduino package:

With the install of the Package Manager in the previous section, this is now an easy task.

Configure and use the Stino Arduino package:

Stino package the location of the official Arduino IDE install. Stino is Sublime Text 2 conduit to that software and it’s libraries. Make sure you have the Arduino IDE installed before completing the steps below.

Don’t have an Arduino? Get a great deal on an Arduino at Amazon.

Well, that wasn’t too bad. Now the moment we have all been waiting for!

Compile and upload sample code:

Finally, we will enter, compile and upload our first program to an Arduino board. I will make things easy and include some sample code for you to use. The Arduino program below will blink the on-board LED.

const int ledPin = 13;
  void setup() {
      pinMode(ledPin, OUTPUT);
  }
  void loop() {
      digitalWrite(ledPin, HIGH);
      delay(1000);
      digitalWrite(ledPin, LOW);
      delay(500);
  }

You are now ready to use the Stino package to create an amazing new physical computing project. And when you do, please share it in the comments below.

Conclusion

New users to Linux have learned the basics of Linux software installation, Sublime Text 2 package management and Stino Arduino package use. In fact, if you “sorta/kinda” understood what were were doing, you have the skills to experiment with some other interesting installs and configurations. If nothing else, you now have installed on your Peppermint OS (or other Debian distro variant) what I consider to be the most powerful Arduino development platform available.