Quick Start: ESP8266
In this guide, you will learn how to quickly get started with the aREST cloud platform & the ESP8266. This guide assumes that you already created an aREST account, so if this is not done yet, you can create a free account here. The guide was made with an Adafruit ESP8266 board, but it should work with most of the ESP8266 boards on the market.
The first step is to get your aREST API key. This is really simple to do as you just need to login in your aREST dashboard:
Then, simply click on the API Key tab or follow this link:
Your API key should be displayed on this page. You'll need it for later, so either save it somewhere or leave the tab open.
The next step is to setup your Arduino IDE that we will use to configure our ESP8266 WiFi chip. If it is not done yet, install the Arduino IDE from:
Once it is installed, you will need to add the ESP8266 board definitions to it so you can use it to configure your ESP8266 board. Here are the instructions to follow in order to do that:
Once this is done, you can install the required libraries for aREST. There are two of them to install: aREST, and PubSubClient. You can install them both using the Arduino Library Manager by going to Sketch > Include Library > Manage Libraries.
It's now time to configure your ESP8266! The easiest way is to load the pre-made sketch from the aREST library called ESP8266_cloud_api_key. You can load it from File > Example > aREST.
Once you have it open, there are two things you need to change: your API key, and your WiFi credentials. Here is how it looks like inside the code:
// aREST API key (that you can get at dashboard.arest.io)
char * key = "your_arest_key";
// WiFi parameters
const char* ssid = "your_wifi_network_name";
const char* password = "your_wifi_network_password";
Make sure to change both of those, and save the example file into a new file.
You can now upload the code to your board! For that, make sure to select the correct board inside the Arduino IDE, the correct serial port, and hit the upload button.
We now have to check that the device is actually connecting to your aREST account. For that, go to:
You should see a new device with the online status:
If this is not the case, make sure to check that you correctly set your API key & your WiFi credentials.
Congratulations, you now have a device connected to your aREST dashboard! You can now use it to control your projects from anywhere in the world. You can now do many things with your device, for example storing measurements made by your device to the aREST cloud.