SlideShare a Scribd company logo
1 of 6
AIM OF THE PROJECT
WeatherStationwithRaspberrypi andArduino
GENERAL APPLICATIONAND DESCRIPTION OF THE PROJECT
Thisprojectcan be usedtoobserve the temperature difference occurringthroughoutthe day,find
out the max and mintemperature andalsorecordthe effectsontemperaturesdue tonatural
calamities.
WORKING OF THE CIRCUIT/MODEL AND IMAGE OF THE CIRCUIT CONNECTION
1. Environmentrepresentsthe surroundingsfromwhere the temperature will be measured.
2. WeatherModel usesa LM35 temperature sensortomeasure the surroundingtemperature and
sendthe data to ArduinoUnoboard.
3. The ArduinoUno boardtakesin the data, convertsitintoCelsiusscale (FormulaVout/2) and
generatesdigital temperature datatobe sentto RaspberryPi.
4. The Raspberrytakesinthe data andcreatesa server.
5. The serverisbasedon NodeJsandusesthe followinglibraries:
a. ‘express’frameworktogenerate askeletonof the serverfiles.
b. ‘http’libraryto take inhttp requestsfromthe client.
c. ‘serialport’librarytotake data fromthe USB port where the Arduinoisconnected.
6. The clientwhichcan run onmobile ordesktoptakesinthe data fromthe serverand then
generate agraph usingthe library:‘d3.js’.
CIRCUIT/MODEL DESCRIPTION
The 3 terminalsof the LM35 are connectedasfollows:
1. +5v
2. Ground
3. Vout
The 5v and groundterminalsare connectedthrougha5kohmresistor.
The Arduinoisconnectedtothe Raspberrypi through Serial Bus.
The pi isconnectedtoa Wi-Fi networkthroughwhichthe clientcanaccess.
SIMPLE BLOCK DIAGRAMOF THE FUNCTIONING OFTHE CIRCUIT/MODEL
IMAGEAND PART NUMBER OF THE COMPONENTSAND THE RESPECTIVE PRICE
COMPONENTS Quantity PRICE ( Rs )
RaspberryPi B+ 1 2899
ArduinoUno 1 550
Male/Female Wires As Reqd 10
Total 3459
ACTUAL IMAGEOF IMPLEMENTED CIRCUIT/MODEL (image of the workingmodel/circuit)
The projectcode can be foundat the github link: https://github.com/zairzacse/LIfetemp
CODE (if programmingisinvolved)
Serverside code :
var app = require('express')();
var http = require('http').Server(app);
var SerialPort=require("serialport").SerialPort;
var serialPort=newSerialPort("/dev/ttyACM0",{
baudrate:9600
});
app.use(require('express').static(__dirname));
var tempdata;
serialPort.on("open",function() {
console.log('opened');
serialPort.on('data',function(data){
data = parseInt(data.toString());
if(data>15 && data<=150){
console.log("Datarecievedis:" + data);
tempdata= data ;
}
});
});
app.get("/data",function(req,res){
res.send({value:tempdata});
});
http.listen(1337,function(){
console.log("listningon1337");
})
Clientside script:
<script>
var n = 40,a;
random = d3.random.normal(0,0),
data = d3.range(n).map(random);
var margin= {top:20, right:20, bottom:20, left:40},
width= 960 - margin.left- margin.right,
height= 500 - margin.top - margin.bottom;
var color = d3.scale.category10();
var x = d3.scale.linear()
.domain([1,n - 2])
.range([0,width]);
var y = d3.scale.linear()
.domain([0,80])
.range([height,0]);
var line = d3.svg.line()
.interpolate("basis")
.x(function(d,i) { returnx(i);})
.y(function(d,i) { returny(d);});
var svg = d3.select("body").append("svg")
.attr("width",width+margin.left+margin.right)
.attr("height",height+margin.top+ margin.bottom)
.append("g")
.attr("transform","translate("+margin.left+","+ margin.top+ ")");
svg.append("defs").append("clipPath")
.attr("id","clip")
.append("rect")
.attr("width",width)
.attr("height",height);
svg.append("g")
.attr("class","x axis")
.attr("transform","translate(0,"+y(0) + ")")
.call(d3.svg.axis().scale(x).orient("bottom"));
svg.append("g")
.attr("class","yaxis")
.call(d3.svg.axis().scale(y).orient("left"));
var path = svg.append("g")
.attr("clip-path","url(#clip)")
.append("path")
.datum(data)
.attr("class","line")
.attr("d",line)
.style('stroke',function(d) { returncolor(d.name);});
tick();
var val = 0;
functiontick() {
$.get("/data").success(function(info){
val=info.value;
//console.log(val);
data.push(val);
});
//varrnd = Math.abs(random()*100);
//pusha newdata pointontothe back
//console.log(val);
//console.log(typeof val);
//redrawthe line,andslide ittothe left
path
.attr("d",line)
.attr("transform",null)
.transition()
.duration(500)
.ease("linear")
.attr("transform","translate("+x(0) + ",0)")
.each("end",tick);
//pop the olddata pointoff the front
data.shift();
}
</script>

More Related Content

What's hot

Fosscon 2012 firewall workshop
Fosscon 2012 firewall workshopFosscon 2012 firewall workshop
Fosscon 2012 firewall workshop
jvehent
 
Docker with BGP - OpenDNS
Docker with BGP - OpenDNSDocker with BGP - OpenDNS
Docker with BGP - OpenDNS
bacongobbler
 

What's hot (19)

Fosscon 2012 firewall workshop
Fosscon 2012 firewall workshopFosscon 2012 firewall workshop
Fosscon 2012 firewall workshop
 
Asynchronous Python at Kumparan
Asynchronous Python at KumparanAsynchronous Python at Kumparan
Asynchronous Python at Kumparan
 
Nxll21 ospf filtering & summarization
Nxll21 ospf filtering & summarizationNxll21 ospf filtering & summarization
Nxll21 ospf filtering & summarization
 
Environmental analysis of crop trials - Van Etten
Environmental analysis of crop trials - Van EttenEnvironmental analysis of crop trials - Van Etten
Environmental analysis of crop trials - Van Etten
 
Rcpp11
Rcpp11Rcpp11
Rcpp11
 
Tessel is a microcontroller that runs JavaScript.
Tessel is a microcontroller that runs JavaScript.Tessel is a microcontroller that runs JavaScript.
Tessel is a microcontroller that runs JavaScript.
 
Hands on lab_instruction(2)
Hands on lab_instruction(2)Hands on lab_instruction(2)
Hands on lab_instruction(2)
 
Docker at OpenDNS
Docker at OpenDNSDocker at OpenDNS
Docker at OpenDNS
 
Nxll20 na ting
Nxll20 na ting Nxll20 na ting
Nxll20 na ting
 
Nxll26 bgp ii
Nxll26 bgp iiNxll26 bgp ii
Nxll26 bgp ii
 
Eincop Netwax Lab: Lab 1 static route
Eincop Netwax Lab: Lab 1 static routeEincop Netwax Lab: Lab 1 static route
Eincop Netwax Lab: Lab 1 static route
 
A deep dive into libuv
A deep dive into libuvA deep dive into libuv
A deep dive into libuv
 
Docker with BGP - OpenDNS
Docker with BGP - OpenDNSDocker with BGP - OpenDNS
Docker with BGP - OpenDNS
 
Eincop Netwax Lab: EIGRP iii
Eincop Netwax Lab: EIGRP iiiEincop Netwax Lab: EIGRP iii
Eincop Netwax Lab: EIGRP iii
 
Nxll28 ospf iii
Nxll28 ospf iiiNxll28 ospf iii
Nxll28 ospf iii
 
Introduction to RevKit
Introduction to RevKitIntroduction to RevKit
Introduction to RevKit
 
FPGAの処理をソフトウェアコンポーネント化する設計ツールcReCompの高機能化の検討
FPGAの処理をソフトウェアコンポーネント化する設計ツールcReCompの高機能化の検討FPGAの処理をソフトウェアコンポーネント化する設計ツールcReCompの高機能化の検討
FPGAの処理をソフトウェアコンポーネント化する設計ツールcReCompの高機能化の検討
 
libuv: cross platform asynchronous i/o
libuv: cross platform asynchronous i/olibuv: cross platform asynchronous i/o
libuv: cross platform asynchronous i/o
 
Eincop Netwax Lab: Access List ii
Eincop Netwax Lab: Access List iiEincop Netwax Lab: Access List ii
Eincop Netwax Lab: Access List ii
 

Viewers also liked

Slide presentation pycassa_upload
Slide presentation pycassa_uploadSlide presentation pycassa_upload
Slide presentation pycassa_upload
Rajini Ramesh
 
Django: Beyond Basics
Django: Beyond BasicsDjango: Beyond Basics
Django: Beyond Basics
arunvr
 

Viewers also liked (20)

Py con india 2016
Py con india 2016Py con india 2016
Py con india 2016
 
Python code profiling - Jackson Isaac
Python code profiling - Jackson IsaacPython code profiling - Jackson Isaac
Python code profiling - Jackson Isaac
 
Celery workshop
Celery workshopCelery workshop
Celery workshop
 
Using Eclipse and Installing PyDev
Using Eclipse and Installing PyDevUsing Eclipse and Installing PyDev
Using Eclipse and Installing PyDev
 
Installing MySQL for Python
Installing MySQL for PythonInstalling MySQL for Python
Installing MySQL for Python
 
V for vagrant
V for vagrantV for vagrant
V for vagrant
 
Python and riak a perfect couple for building
Python and riak   a perfect couple for buildingPython and riak   a perfect couple for building
Python and riak a perfect couple for building
 
Pycon2015 scope
Pycon2015 scopePycon2015 scope
Pycon2015 scope
 
Setup a New Virtualenv for Django in Windows
Setup a New Virtualenv for Django in WindowsSetup a New Virtualenv for Django in Windows
Setup a New Virtualenv for Django in Windows
 
Building largescalepredictionsystemv1
Building largescalepredictionsystemv1Building largescalepredictionsystemv1
Building largescalepredictionsystemv1
 
Flying A Drone
Flying A DroneFlying A Drone
Flying A Drone
 
Slide presentation pycassa_upload
Slide presentation pycassa_uploadSlide presentation pycassa_upload
Slide presentation pycassa_upload
 
OpenStack Storage Overview
OpenStack Storage OverviewOpenStack Storage Overview
OpenStack Storage Overview
 
Installing Python 2.7 in Windows
Installing Python 2.7 in WindowsInstalling Python 2.7 in Windows
Installing Python 2.7 in Windows
 
Consensus algo with_distributed_key_value_store_in_distributed_system
Consensus algo with_distributed_key_value_store_in_distributed_systemConsensus algo with_distributed_key_value_store_in_distributed_system
Consensus algo with_distributed_key_value_store_in_distributed_system
 
Django: Beyond Basics
Django: Beyond BasicsDjango: Beyond Basics
Django: Beyond Basics
 
Automated data analysis with Python
Automated data analysis with PythonAutomated data analysis with Python
Automated data analysis with Python
 
Django with MongoDB using MongoEngine
Django with MongoDB using MongoEngineDjango with MongoDB using MongoEngine
Django with MongoDB using MongoEngine
 
Introduction to Machine Learning in Python using Scikit-Learn
Introduction to Machine Learning in Python using Scikit-LearnIntroduction to Machine Learning in Python using Scikit-Learn
Introduction to Machine Learning in Python using Scikit-Learn
 
Rest apis with DRF
Rest apis with DRFRest apis with DRF
Rest apis with DRF
 

Similar to Report for weather pi

20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris
imec.archive
 
ADCSS 2022
ADCSS 2022ADCSS 2022
ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale
Subbu Allamaraju
 
Networks lab
Networks labNetworks lab
Networks lab
svijiiii
 
Please help with the below 3 questions, the python script is at the.pdf
Please help with the below 3  questions, the python script is at the.pdfPlease help with the below 3  questions, the python script is at the.pdf
Please help with the below 3 questions, the python script is at the.pdf
support58
 
TCP IP
TCP IPTCP IP
TCP IP
hivasu
 

Similar to Report for weather pi (20)

Webshield internet of things
Webshield internet of thingsWebshield internet of things
Webshield internet of things
 
Network security Lab manual
Network security Lab manual Network security Lab manual
Network security Lab manual
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris
 
ADCSS 2022
ADCSS 2022ADCSS 2022
ADCSS 2022
 
Gas leakage detection system
Gas leakage detection systemGas leakage detection system
Gas leakage detection system
 
ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale
 
Senior Design: Raspberry Pi Cluster Computing
Senior Design: Raspberry Pi Cluster ComputingSenior Design: Raspberry Pi Cluster Computing
Senior Design: Raspberry Pi Cluster Computing
 
Networks lab
Networks labNetworks lab
Networks lab
 
Networks lab
Networks labNetworks lab
Networks lab
 
Advanced RAC troubleshooting: Network
Advanced RAC troubleshooting: NetworkAdvanced RAC troubleshooting: Network
Advanced RAC troubleshooting: Network
 
Telelab 2
Telelab 2Telelab 2
Telelab 2
 
Please help with the below 3 questions, the python script is at the.pdf
Please help with the below 3  questions, the python script is at the.pdfPlease help with the below 3  questions, the python script is at the.pdf
Please help with the below 3 questions, the python script is at the.pdf
 
TCP IP
TCP IPTCP IP
TCP IP
 
Code Red Security
Code Red SecurityCode Red Security
Code Red Security
 
Starting with Arduino
Starting with Arduino Starting with Arduino
Starting with Arduino
 
2014 09 30_sparkling_water_hands_on
2014 09 30_sparkling_water_hands_on2014 09 30_sparkling_water_hands_on
2014 09 30_sparkling_water_hands_on
 
A.java
A.javaA.java
A.java
 
Arduino delphi 2014_7_bonn
Arduino delphi 2014_7_bonnArduino delphi 2014_7_bonn
Arduino delphi 2014_7_bonn
 
Android Things in action
Android Things in actionAndroid Things in action
Android Things in action
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation Tools
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 

Report for weather pi

  • 1. AIM OF THE PROJECT WeatherStationwithRaspberrypi andArduino GENERAL APPLICATIONAND DESCRIPTION OF THE PROJECT Thisprojectcan be usedtoobserve the temperature difference occurringthroughoutthe day,find out the max and mintemperature andalsorecordthe effectsontemperaturesdue tonatural calamities. WORKING OF THE CIRCUIT/MODEL AND IMAGE OF THE CIRCUIT CONNECTION 1. Environmentrepresentsthe surroundingsfromwhere the temperature will be measured. 2. WeatherModel usesa LM35 temperature sensortomeasure the surroundingtemperature and sendthe data to ArduinoUnoboard. 3. The ArduinoUno boardtakesin the data, convertsitintoCelsiusscale (FormulaVout/2) and generatesdigital temperature datatobe sentto RaspberryPi. 4. The Raspberrytakesinthe data andcreatesa server. 5. The serverisbasedon NodeJsandusesthe followinglibraries: a. ‘express’frameworktogenerate askeletonof the serverfiles. b. ‘http’libraryto take inhttp requestsfromthe client. c. ‘serialport’librarytotake data fromthe USB port where the Arduinoisconnected. 6. The clientwhichcan run onmobile ordesktoptakesinthe data fromthe serverand then generate agraph usingthe library:‘d3.js’. CIRCUIT/MODEL DESCRIPTION The 3 terminalsof the LM35 are connectedasfollows: 1. +5v 2. Ground 3. Vout The 5v and groundterminalsare connectedthrougha5kohmresistor. The Arduinoisconnectedtothe Raspberrypi through Serial Bus. The pi isconnectedtoa Wi-Fi networkthroughwhichthe clientcanaccess.
  • 2. SIMPLE BLOCK DIAGRAMOF THE FUNCTIONING OFTHE CIRCUIT/MODEL IMAGEAND PART NUMBER OF THE COMPONENTSAND THE RESPECTIVE PRICE COMPONENTS Quantity PRICE ( Rs ) RaspberryPi B+ 1 2899 ArduinoUno 1 550 Male/Female Wires As Reqd 10 Total 3459 ACTUAL IMAGEOF IMPLEMENTED CIRCUIT/MODEL (image of the workingmodel/circuit)
  • 3. The projectcode can be foundat the github link: https://github.com/zairzacse/LIfetemp CODE (if programmingisinvolved) Serverside code : var app = require('express')(); var http = require('http').Server(app); var SerialPort=require("serialport").SerialPort; var serialPort=newSerialPort("/dev/ttyACM0",{ baudrate:9600 }); app.use(require('express').static(__dirname)); var tempdata; serialPort.on("open",function() { console.log('opened'); serialPort.on('data',function(data){ data = parseInt(data.toString()); if(data>15 && data<=150){ console.log("Datarecievedis:" + data); tempdata= data ; } }); }); app.get("/data",function(req,res){ res.send({value:tempdata}); }); http.listen(1337,function(){ console.log("listningon1337");
  • 4. }) Clientside script: <script> var n = 40,a; random = d3.random.normal(0,0), data = d3.range(n).map(random); var margin= {top:20, right:20, bottom:20, left:40}, width= 960 - margin.left- margin.right, height= 500 - margin.top - margin.bottom; var color = d3.scale.category10(); var x = d3.scale.linear() .domain([1,n - 2]) .range([0,width]); var y = d3.scale.linear() .domain([0,80]) .range([height,0]); var line = d3.svg.line() .interpolate("basis") .x(function(d,i) { returnx(i);}) .y(function(d,i) { returny(d);}); var svg = d3.select("body").append("svg") .attr("width",width+margin.left+margin.right) .attr("height",height+margin.top+ margin.bottom) .append("g") .attr("transform","translate("+margin.left+","+ margin.top+ ")"); svg.append("defs").append("clipPath") .attr("id","clip") .append("rect") .attr("width",width) .attr("height",height); svg.append("g")
  • 5. .attr("class","x axis") .attr("transform","translate(0,"+y(0) + ")") .call(d3.svg.axis().scale(x).orient("bottom")); svg.append("g") .attr("class","yaxis") .call(d3.svg.axis().scale(y).orient("left")); var path = svg.append("g") .attr("clip-path","url(#clip)") .append("path") .datum(data) .attr("class","line") .attr("d",line) .style('stroke',function(d) { returncolor(d.name);}); tick(); var val = 0; functiontick() { $.get("/data").success(function(info){ val=info.value; //console.log(val); data.push(val); }); //varrnd = Math.abs(random()*100); //pusha newdata pointontothe back //console.log(val); //console.log(typeof val); //redrawthe line,andslide ittothe left path .attr("d",line) .attr("transform",null) .transition()