he Intel Edison is a tiny computer-on-module offered by Intel as a development system for the Internet of Things (IoT). It features a dual-core Intel Quark x86 CPU at 400 MHz communicating via Bluetooth and Wi-Fi. 

In this step-by-step guide you will learn to:

  • Assemble and connect cables to your Intel® Edison board.
  • Run the setup tools to install USB drivers and flash to your Intel® Edison board's firmware.
  • Set a device password and connect your development board to Wi-Fi.
  • Collect, analyze, and organize your Ubidots dashboard for device and data management. 

Requirements

  • Intel® Edison compute module
  • Arduino* expansion board
  • Micro-B USB to Standard-B USB cables (x 2)
  • Direct current (DC) power supply (see specs)

The Intel® Edison compute module and breakout board can typically be purchased together as a kit. See here (find a partner from IoT World) 

Setting up the Intel Edison

  1. Assemble the Intel Edison Board. Click here for additional support if you are not familiar with the board's assembly. 

2. Download the latest configuration tool for your system to access the features in the current Intel® IoT Developer Kit release. 

3. Follow step-by-step the instructions of the configurations tool to get your board set-up.

4. Install the USB drivers. Remember this step because the drivers allow your computer to recognize the boards as devices.

5. Download the latest firmware and flash it to your Intel Edison. Please be patient as this will take a few minutes.  

 6. Once finished, the below screen will appear. Please ensure your board is properly connected to your PC and power unit to allow for the flash and reboot.

7. Set a device name and password to enable SHH, if you want to use this. (For this, a guide is not needed).

8. Connect your board to Wi-Fi. It will scan for the available networks, select the correct signal and security for the network, and enter the Wi-Fi password. If you change any wifi settings, do not forget to write them down for next time.

9. Once your device connects to the network, you will see the IP address.

10. Ensure all the configuration are already checked. Click on the “Finish” button once confirmed. 

Setting up the Arduino IDE

  1. Open the Arduino IDE, if you don’t have it, download here
  2. Go to Tools > Board > Boards Manager. 

3. Filter your search, write “Intel” and install it. 

4. Once installed, select the board and choose the COM port of the Intel Edison.

5. To program your Intel Edison copy the following code into the Arduino IDE.
`

/*************************************************************************************************
 * This Example sends  harcoded data to Ubidots and serves as example for users which
 * desire build a HTTP request to the Ubidots API with any device. Please reference to the link below
 * to find more information about it - Ubidots REST API Reference - https://ubidots.com/docs/api/
 *
 * You will find a help guide for this code on the link below:
 * http://help.ubidots.com/connect-your-devices/connect-your-intel-edison-to-ubidots-using-arduino-over-http
 *
 * This example is given AS IT IS without any warranty.
 *  
 * Made by María Carlina Hernández.
 *************************************************************************************************/

/********************************
 * Libraries included
 *******************************/
#include <WiFi.h>
#include <SPI.h>

/********************************
 * Constants and objects
 *******************************/
/* Assigns the network parameters */
char* WIFI_SSID = "Assign_your_WIFI_SSID_here"; // your network WIFI_SSID (name)
char* WIFI_PASSWORD = "Assign_your_WIFI_PASSWORD_here"; // your network password

/* Assigns the Ubidots parameters */
char const * TOKEN = "Assign_your_Ubidots_TOKEN_here"; // Assign your Ubidots TOKEN
char const * DEVICE_LABEL = "edison"; // Assign the unique device label
char const * VARIABLE_LABEL_1 = "temperature"; // Assign the unique variable label to publish data to Ubidots (1)
char const * VARIABLE_LABEL_2 = "humidity"; // Assign the unique variable label to publish data to Ubidots (2)

/* Parameters needed for the requests */
char const * USER_AGENT = "EDISON";
char const * VERSION = "1.0";
char const * SERVER = "things.ubidots.com";
int PORT = 80;
char topic[700];
char payload[300];

/* initialize the library instance */
WiFiClient client;

/********************************
 * Auxiliar Functions
 *******************************/

void SendToUbidots(char* payload) {

  int i = strlen(payload);
  /* Builds the request POST - Please reference this link to know all the request's structures https://ubidots.com/docs/api/ */
  sprintf(topic, "POST /api/v1.6/devices/%s/?force=true HTTP/1.1\r\n", DEVICE_LABEL);
  sprintf(topic, "%sHost: things.ubidots.com\r\n", topic);
  sprintf(topic, "%sUser-Agent: %s/%s\r\n", topic, USER_AGENT, VERSION);
  sprintf(topic, "%sX-Auth-Token: %s\r\n", topic, TOKEN);
  sprintf(topic, "%sConnection: close\r\n", topic);
  sprintf(topic, "%sContent-Type: application/json\r\n", topic);
  sprintf(topic, "%sContent-Length: %d\r\n\r\n", topic, i);
  sprintf(topic, "%s%s\r\n", topic, payload);
 
  /* Connecting the client */
  client.connect(SERVER, PORT);

  if (client.connected()) {
    /* Sends the request to the client */
    client.print(topic);
    Serial.println("Connected to Ubidots - POST");
  } else {
    Serial.println("Connection Failed ubidots - Try Again");
  }  
   
  /* Reads the response from the server */
  while (client.available()) {
    char c = client.read();
    //Serial.print(c); // Uncomment this line to visualize the response on the Serial Monitor
  }

  /* Disconnecting the client */
  client.stop();
}

/********************************
 * Main Functions
 *******************************/
 
void setup() {
  Serial.begin(115200);
  Serial.print("Connecting to ");
  Serial.println(WIFI_SSID);
  /* Connects to AP */
  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
   
  Serial.println(F("WiFi connected"));
  Serial.println(F("IP address: "));
  Serial.println(WiFi.localIP());
}

void loop() {
  /* Reads sensors values */
  float temperature = analogRead(A0);
  float humidity = analogRead(A1);
 
  /* Builds the payload - {"temperature":25.00,"humidity":50.00} */
  sprintf(payload, "{\"");
  sprintf(payload, "%s%s\":%f", payload, VARIABLE_LABEL_1, temperature);
  sprintf(payload, "%s,\"%s\":%f", payload, VARIABLE_LABEL_2, humidity);
  sprintf(payload, "%s}", payload);
 
  /* Calls the Ubidots Function POST */
  SendToUbidots(payload);
  /* Prints the data posted on the Serial Monitor */
  Serial.println("Posting data to Ubidots");
  Serial.print("Temperature: ");
  Serial.println(temperature);
  Serial.print("Humidity: ");
  Serial.println(humidity);

  delay(5000);
}

6. Once you paste the code, you have to assigns the Ubidots parameters to be able to manage the data with the platform.

Below is a list of required parameters: these can be customized to your project or specific to our tutorial. If you change any variable titles, know this will effect the outcome of your variables because you are adjusting code.

  • TOKEN: Ubidots TOKEN. If you don't how get your Ubidots TOKEN, please reference this article - How to get your Ubidots TOKEN.
  • DEVICE_LABEL: This is the unique label of your Device.
  • VARIABLE_LABEL: This is the unique label of your Variable. 

 NOTE: Check out our API docs to learn how to send data to Ubidots. Also, I recommend you read this article to get a better idea how Device Labels and Variables Labels works - How to adjust the Device Name and Variable Name.

7. Verify the program clicking the check icon, then upload the code clicking the arrow icon.

8. Once your program is uploaded into the board, you’ll receive the following message on the Arduino IDE.

9. Once the code is uploaded into the board, it will be create the device called "edison" automatically in your Ubidots dashboard. So, let's go back to your Ubidots account, (or here for Business and Industrial users) select the Devices tab and you’ll will find the created device. Open to the device called "edison" and you’ll find the variables you assigned on the code.

Now it is time to create a dashboard to control and manage the variables of your Intel Edison Board. To learn more about Ubidots widgets and events, check out these video tutorials.

Result

In this guide you’ve learned how to configure an Intel Edison with the Arduino breakout board in just a few minutes. You also learned, how to send data to the Ubidots cloud for managing your newly acquired data. 

 Happy Hacking :D   

Did this answer your question?