This is an old revision of the document!


Installing Atom with PlatformIO and creating your first project

Source: http://docs.platformio.org/en/latest/ide/atom.html#installation

This tutorial describes how to download and install PlatformIO as an Atom plugin.

Installation

  1. Download and install official GitHub’s Atom text editor. PlatformIO will be installed as a plugin to it.
  2. Open Atom Package Manager (Linux,OS → Menu: Edit > Preferences > Install, Windows → Menu: File > Settings > Install)
  3. Search for official Platformio-ide package
  4. Install PlatformIO IDE
  5. Intall clang
  • Linux: Using package managers: apt-get install clang or yum install clang.
  • Mac OS X: Install the latest Xcode along with the latest Command Line Tools (they are installed automatically when you run clang in Terminal for the first time, or manually by running
     xcode-select --install 
  • Windows: Download Clang 3.9.1 for Windows. Please select “Add LLVM to the system PATH” option on the installation step.

PLEASE DO NOT INSTALL CLANG 4.0. PLATFORMIO TEMPORARY SUPPORTS ONLY CLANG 3.9.

If you see Failed to find MSBuild toolsets directory error in the installation console, please ignore it and press any key to close this window. PlatformIO IDE uses only Clang completion engine that should work after it without any problems.

Setting Up the Project

  • Click on “PlatformIO Home” button on the PlatformIO Toolbar

  • Click on “New Project”

  • Choose a name for your project. In board selection choose “WeMos D1 R2 & mini (WEMOS)” and the framework should be “Arduino”.

  • Open platformio.ini file and paste
    lib_deps = ITTIoT, EmonLib, Adafruit NeoPixel, Encoder, Adafruit GFX Library, DHT sensor library, Adafruit Unified Sensor, Wemos Matrix Adafruit GFX 

    to the end of the framework line

  • Open main.cpp file form src folder and replace its contents with some code
  • Run Build (PlatformIO > Build) and you should see green “success” result in the building panel

  • To upload firmware to the board run Upload
  • What is more, you can run specific target or process project environment using (Menu: PlatformIO > Run other target…) or call targets list from the status bar (bottom, left corner)

(If your having uploading problems with Linux, try sudo chown username /dev/ttyUSB0)

  1. To run built-in terminal interface choose (Menu: PlatformIO > Terminal) or press the corresponding icon in the PlatformIO toolbar

  1. To run built-in “Serial Monitor” choose (Menu: PlatformIO > Serial Monitor) or press the corresponding icon in the PlatformIO toolbar

Link for installation: http://docs.platformio.org/en/latest/ide/atom.html#installation

en/iot/examples/setup/usb.1548857835.txt.gz · Last modified: 2020/07/20 09:00 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0