Tuesday, 6 December 2016

Real Time Sensor Data | Email | Raspberry-Pi

          Raspberry Pi is an single chip tiny computer board which comes up with the several internal features. It's been used for several purposes. Today I came up with the Idea of Sending the Real Time Sensor Data via Gmail. Work begins... Before jumping into it. Setting up of your pi is important

Hardware Required

Required Items

Software Required

  • Python Interpreter   (No need any Special Download. Built-in with Raspbian)

Pi - Python

Wiring to Sensor

          As mentioned earlier I used HC-SR04 Ultrasonics sensor to read it's data. The connection between the sensor and the R-pi is shown.

Pin Connections

 Coding Time...

          We are going to write the code in Python. Make sure you have an updated version of python in your jessie of your R-pi. If you don't have, do this

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install python3

after this is done, just copy the code and paste in your python Editor window not in Interpreter window. Save the file.

Note: For the sender's mail, the less security app should be allowed in the Gmail to access it through Python

Coding

          After this, the code is complied and Runned by either simply pressing F5 or from the Terminal window of your R-pi. Save the file in the home directory so that we can run from multiple windows.

Running From Terminal

python filename.py

Terminal Run code

Received Mail

          Wow... Worked. Here we go.. I got a mail from the Sensor.

Mail

Prototype

          The below shown is my prototype. If you develop one. Share your prototype design also in the comment below.

Prototype

Thank you

Suggestions, quires, complaints? Feel free to drop mail

2 comments: