Assignment 5

Networking and Communications

Building Mobile App-Location Detector

For the purpose of first part of assignment, I have built an app using MIT app inventor which spots the location of user in map and upon detection LED blinks via arduino.  

Steps

Code

For connecting arduino to mobile app, this code is followed. Further additions on app code are done under blocks section in MIT app inventor and can be explored here

NodeMCU based Weather Station

This mini project is around nodeMCU based sensor data communication to cloud. A DHT11 with NodeMCU setup would be used to send data to Thingspeak cloud. This data would be analysed further for heat index calculation.

Steps

  1. Circuit was assembled in my study room (which remains undisturbed) as shown below. No fan or air conditioner is turned on. Connections are pretty much simple with nodeMCU and DHT11 (VIN -> VCC, DATA -> V2, GND -> GND)
  2. Used MATLAB account details to log in to ThingSpeak cloud channel. New channel creation box promts to a list of fields. Activate the fields wanted (Field 1 and Field 2 for temperature and RH data)
  3. Data is received by describing API key details in code. A new "write API" key is generated under API keys tab.
  4. For uploading code to nodeMCU, arduino sketch is used. In the arduino sketch, Wi-fi details along with password and API key are updated. Certain packages have to be downloaded in arduino sketch before running nodeMCU and board type also needs to changed. Details can be found here
  5. Once sketch is complete, NodeMCU is connected and sketch is uploaded. Temperature and RH measurements are observed using serial monitor. Readings are taken in every 5 minutes continously.
  6. Measurements are collected for 8 hours 30 minutes

Results

NodeMCU-Codes

References

  1. Heat Index Calculation
  2. Data Appendix