For a few months I started learning the Arduino in order to create projects that do not require a large installation. The Raspberry Pi was fine at first, but soon you realize that it’s too big for projects that only require a temperature control or different display script.

The official Arduino IDE is very comprehensive, but soon after several hours of writing, my eyes started to make me a headache. All this white ! ARGH !

So I quickly looked for an alternative. And found it under the name of PlatformIO. To explain quickly, PlatformIO is a mod for Atom.io that allows you to compile for Arduino boards.

Installation :

First download and install the application from the site. When it’s done, start Atom to see the splash screen

Click on New Project

Start by choosing a board (I have only an Arduino Mega but you can select more than one board), your project’s directory. Hit Enter !

You should now see some folders/files.

Create a new file called blink.cpp and add this code :

#include <Arduino.h> void setup() { pinMode(LED_BUILTIN, OUTPUT); } void loop() { digitalWrite(LED_BUILTIN, HIGH); delay(1000); digitalWrite(LED_BUILTIN, LOW); delay(1000); }

Don’t forget to add :

#include <Arduino.h>

Save it, then Build and Upload it to your Arduino Board.

If all went well, you should see a few seconds later, the Builtin LED flash on your Board.

Install Libraries :

It’s not hard to install libraries on Atom, just a little bit different. You can use their website and follow the instructions or Just open in your project the platformio.ini and add a new key called lib_deps =. Then the git folder to the lib. For example :

lib_deps = https://github.com/PaulStoffregen/Time.git https://github.com/JChristensen/DS3232RTC.git https://github.com/FastLED/FastLED.git https://github.com/nethoncho/Arduino-DHT22.git

PlatformIO PlatformIO offers many options such as a terminal or a Serial Monitor but it would take too long to explain ton of options that this mod has to offer.

I use it for several days now, and I must admit that I can no longer do without it. Lightweight, easy to use and nicer to code with for hours without headache it’s a real pleasure.

I won’t compare the compile or upload time, but i’m pretty sure that this is more or less equivalent to the official IDE.

(source : platformio.org)