Close
0%
0%

Connect your Feather HUZZAH ESP8266 to Ubidots

Learn how to setup your Adafruit Feather HUZZAH ESP8266 with Ubidots

Similar projects worth following
In the following tutorial, Ubidots will demonstrate how to setup and program the Adafruit Feather HUZZAH with ESP8266 using the Arduino IDE to display data with Ubidots.
  • Connect your Feather HUZZAH ESP8266 to Ubidots

    Maria Carlina Hernandez01/11/2018 at 15:38 0 comments

    The Adafruit Feather HUZZAH ESP8266 is an 'all-in-one' ESP8266 WiFi development board with built in USB and battery charging.

    The Feather HUZZAH has an ESP8266 WiFi microcontroller clocked at 80 MHz and 3.3V logic, able to be programmed using the Arduino IDE for an easy-to-use Internet of Things applications; click here for additional specs for the Feather HUZZAH ESP8266.

    In the following tutorial, Ubidots will demonstrate how to setup and program the Adafruit Feather HUZZAH with ESP8266 using the Arduino IDE to display data with Ubidots.

View project log

  • 2
    Feather HUZZAH Setup using the Arduino IDE

    Begin by connecting your Feather HUZZAH ESP8266 to your computers USB port to configure the device.

    1. Download the Arduino IDE if you not already have it. 1a. Open the Arduino IDE, select Files -> Preferences and enter the URL below into the Additional Board Manager URLs field. You can add multiple URLs by separating them with commas:

    http://arduino.esp8266.com/stable/package_esp8266com_index.json

    NOTE: If you're a Mac user, please note that in the Arduino software configurations are slightly different from Windows and Linux. Further, you may have to install the following driver to be able to upload your NodeMCU.

    2. Open Boards Manager from Tools -> Board -> Boards Manager and install esp8266 platform. To simply find the correct device, search ESP8266 within the search bar.


    3. Select your Adafruit Feather HUZZAH ESP8266 from Tools > Board menu. 4. Additionally, we need to be able to communicate with the Feather HUZZAH ESP8266 by selecting the proper port com. Go to Tools > Port > Select the appropriate PORT for your device.

    5. To keep everything running fast and smooth - let's make sure the upload speed is optimized to 115200. Go to Tools > Upload Speed > 115200:

    IMPORTANT NOTE:  Don't forget you will also need to install the SiLabs CP2104 Driver to be able to program the board properly. 

    6. Close and REBOOT the Arduino IDE. 

    7. Now with everything configured, UPLOAD the Blink Sketch to verify that everything is working properly. Go to File > Examples > Basics > Blink and compile the code. 

    8. Once the code is properly updated the a red LED will start blinking.

    9. Download and install the Ubidots library. For a detailed explanation of how to install libraries using the Arduino IDE, refer to this guide

  • 3
    Ubidots account setup

    With the following example, you will be able to simulate random readings taken from the Feather HUZZAH ESP8266 to Ubidots

    1. To begin posting values to Ubidots, open the Arduino IDE and paste the sample code below. Once you have pasted the code, be sure to assign the following parameters:

    • SSID (WiFi Name) & Password of the available network connection.
    • Ubidots TOKEN
      /****************************************
       * Include Libraries
       ****************************************/
      
      #include "Ubidots.h"
      
      /****************************************
       * Define Instances and Constants
       ****************************************/
      
      const char* UBIDOTS_TOKEN = "...";  // Put here your Ubidots TOKEN
      const char* WIFI_SSID = "..."; // Put here your Wi-Fi SSID
      const char* WIFI_PASS = "..."; // Put here your Wi-Fi password
      
      Ubidots ubidots(UBIDOTS_TOKEN, UBI_HTTP);
      
      /****************************************
       * Auxiliar Functions
       ****************************************/
      
      // Put here your auxiliar functions
      
      /****************************************
       * Main Functions
       ****************************************/
      
      void setup() {
        Serial.begin(115200);
        ubidots.wifiConnect(WIFI_SSID, WIFI_PASS);
      
        // ubidots.setDebug(true);  // Uncomment this line for printing debug messages
      }
      
      void loop() {
        float value1 = random(0, 9) * 10;
        float value2 = random(0, 9) * 100;
        float value3 = random(0, 9) * 1000;
        ubidots.add("Variable_Name_One", value1);  // Change for your variable name
        ubidots.add("Variable_Name_Two", value2);
        ubidots.add("Variable_Name_Three", value3);
      
        bool bufferSent = false;
        bufferSent = ubidots.send("feather-huzzah");  // Will send data to a device label that matches the device Id
      
        if (bufferSent) {
          // Do something if values were sent properly
          Serial.println("Values sent by the device");
        }
      
        delay(5000);
      }

    2. Verify your code within the Arduino IDE. To do this, in the top left corner of our Arduino IDE you will see the "Check Mark" icon press it to verify your code. 

    3. Upload the code into your  Feather HUZZAH ESP8266. To do this, choose the "right-arrow"icon beside the check mark icon. 

    4. To verify the connectivity of the device, open the serial monitor by selecting the "magnifying glass" icon in the top right corner of our Arduino IDE. 

    5. Confirm your data in Ubidots. Now you should see the published data in your Ubidots account, locate the device called "feather-huzzah" and visualize your data.

View all 4 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates