In this tutorial, we are going to connect ARIES v2.0 Board to Adafruit IoT cloud platform with the help of ESP8266 NodeMCU.

ESP8266 NodeMCU

NodeMCU is an open-source Lua-based firmware and development board specially targeted for IoT-based Applications. It includes firmware that runs on the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware that is based on the ESP-12 module.

ESP8266 is a highly integrated chip designed for the needs of a new connected world. It offers a complete and self-contained Wi-Fi networking solution allowing it to either host the application or to offload all Wi-Fi networking functions from another application processor. Its high degree of on-chip integration allows for minimal external circuitry. It is designed to occupy a minimal PCB area.

Prerequisites

Components Required

  • ARIES v2.0 Board
  • Micro USB type B to USB type A cable
  • ESP8266 NodeMCU module
  • Jumper Wires

Circuit Diagram:

Connection Diagram for NodeMCU module with ARIES v2.0

NodeMCU ESP8266 WiFi ModuleARIES v2 Board
VCC3.3V
GNDGND
RXTX1
TXRX1
Connection pins for NodeMCU with ARIES v2.0

Procedure

We have to configure the Adafruit IO cloud server before uploading the program to ARIES microcontroller.

Follow the below steps for configuring Adafruit IoT cloud platform

  • SIGN UP on Adafruit from Adafruit IO if you doesn’t have an account. If you have Adafruit account use SIGN IN option and login with your credentials.
  • Click on feeds menu
  • Once the feed menu is opened, Click on New feed
  • Create a new feed by giving any feed name. Here we have used “postDemo” as the feed name. You can give any feed name and Click on Create
  • Now you can see the feed has been created as follows.
  • Now click on Dashboards menu
  • Click on New Dashboard for creating a dashboard
  • Give any Dashboard name you like. Here we have given “ExamplePostDemo” as dashboard name and click on Create
  • Now you can see the dashboard has been created as follows.
  • Click on the Dashboard name you created, to open the dashboard.
  • Once you enter inside the dashboard you created, you can see a black page as follows. Click on the gear icon on the top right
  • This will open up a menu as shown in the below figure. Click on Create New Block
  • You can see the available blocks to display the data. Here we will be using the Gauge block to display the random data coming from the ARIES micro-controller. You can also use line chart or text display or any other blocks based on your requirements.
  • In the next step, Tick Mark the checkbox to link your feed with the dashboard and click on NEXT STEP
  • Give a block title for your selected block. Remaining fields are optional and click on Create Block.
  • Now the block has been created. The data from the sensor will be displayed inside this block you created now.
  • Click on the yellow key icon to Copy the Adafruit API key (Active Key) to replace the key in the Arduino code.

Click on feed -> Feed info. Copy the MQTT key to replace in the URL portion in the Arduino code


Now you need to change the Credentials in Arduino program

Open and set up the Arduino IDE as described in Getting Started with ARIES v2.0.

  • After connecting ARIES v2 board to your computer, Make sure you have selected ARIES v2 Board from Tools -> Board -> VEGA Processor: ARIES Boards -> ARIES v2
  • Select Programmer as VEGA XMODEM from Tools -> Programmer -> VEGA XMODEM
  • Also select appropriate port from Tools -> Port -> COM* (ARIES v2)

Now, Open Files -> Examples -> Under Examples for ARIES v2 -> UART-> NodeMCU_post_demo

Change the credentials on the code as shown in the image

Once the hotspot name, hotspot password,KEY and URL has been replaced with your’s, the procedure is completed.

Finally, Upload the code to ARIES v3 Board.

Output

Now, when you open your Serial Monitor in the Arduino IDE , you can see the AT commands. The first AT command (AT -> OK) indicates that the circuit connections are correct. If first AT command itself is fail (AT -> Fail) it means your connections between Wi-Fi module and ARIES board are wrong, so you need to make the correct connections and upload the code once again. If you have done all steps correctly, within a few seconds all the AT commands will become OK in the serial monitor.

Once all the AT commands are OK, then the data will automatically sent to the Adafruit cloud platform. You can open the dashboard you created in Adafruit to view the real time data in Adafruit server as shown in the below images. In the example program given, we are sending random data using the random function available in the Arduino program. So the random values will be displayed in the Adafruit cloud server as shown.



By mydhily

Leave a Reply

Your email address will not be published. Required fields are marked *