|Published (Last):||17 November 2012|
|PDF File Size:||17.50 Mb|
|ePub File Size:||4.37 Mb|
|Price:||Free* [*Free Regsitration Required]|
PlatformIO has recently been released to bring some much needed improvements to the ecosystem. Since the hardware is an open standard, they can be bought from a variety of vendors. This tutorial will demonstrate how to use PlatformIO to program a NodeMcu microcontroller using the Arduino libraries.
If you already have Atom installed, follow these instructions to install the PlatformIO package. Once installed you should see the PlatformIO toolbar in Atom. Depending on how you install, you may experience the error "command not found: pio" when performing later steps in this tutorial. If you do, follow the instructions to do a manual install. For me, it was solved by running "pip install platformio" on my Mac to get the command line tools properly installed. Download and install the driver from Silicon Labs website.
This option is also available in the PlatformIO main menu. On the popup, select the board and the directory to place your project. As you can see, PlatformIO supports a wide variety of boards. This will take a while the first time as PlatformIO downloads and installs the correct tools for your board.
Right mouse click on the "src" folder and add a new file named "main. Copy paste the below code into "main. First, select the serial port to connect to.
On Windows, it will be named something like "Com3". Next, select the baud rate. This should be the same value you used for the "Serial. For our example, we used After you click "Start", you should start to see serial output from the microcontroller in a window at the bottom of the screen. The serial monitor should print "Hello World! Using Libraries and Connecting to The Losant Platform There are a ton of already existing Arduino libraries that we can make use of when developing connecting solutions.
Doing this requires three libraries: losant-sdk-arduino , pubsubclient , and ArduinoJson. The library manager is simply a command line tool. To use it, first search for the required library, and then install it using the returned id. Once open, run these commands. When I copy-pasted the example code into the editor, PlatformIO showed some incorrect compile errors. Hit the "Build" button to see if it succeeds.
It appears as though the inline error checking still needs some tweaks. All-in-all, PlatformIO is a major step forward for the development ecosystem.
It has completely replaced my day-to-day environment. The library management system is a much needed addition and will bring major productivity boosts to embedded development. If you have any questions or comments, please feel free to leave them below.
Embedded Programming Vergleich – Betriebssysteme Test im Überblick!
Subscribe to RSS
Python 3: Lernen und professionell anwenden. Das umfassende Praxisbuch