Online thermometer with local backup: Difference between revisions

From wikiluntti
Line 11: Line 11:


Wires:
Wires:
*VCC - red wire Connect to 3.3 - 5V power. 1st on left.
*VCC - red wire Connect to 3.3 - 5V power. 1st on left. [Brown -> yellow]
*Data out - white or yellow wire. 2nd on left
*Data out - white or yellow wire. 2nd on left. [Blue -> black]
*Not connected
*Not connected
*Ground - black wire. 4rd on left or first on right.
*Ground - black wire. 4rd on left or first on right. [Green-yellow -> black]


== Theory ==
== Theory ==

Revision as of 14:33, 19 August 2021

Introduction

We use AM2302 (wired DHT22) temperature-humidity sensor with Raspberry Pi. Pi is set up to measure temperature and humidity every minutes (perhaps 5min), and the is securely sent to online web server if possible. If not, the will be saved to local database and transferred when RPi is online.


The data is visualized using D3.js library with zoom and pan. The current location of RPi can be changed online, and the location is shown on the visualization page.

AM2302 Sensor

https://learn.adafruit.com/dht/connecting-to-a-dhtxx-sensor

Wires:

  • VCC - red wire Connect to 3.3 - 5V power. 1st on left. [Brown -> yellow]
  • Data out - white or yellow wire. 2nd on left. [Blue -> black]
  • Not connected
  • Ground - black wire. 4rd on left or first on right. [Green-yellow -> black]

Theory

Get the data

Save the data to local or online database securely

Set the location

Visualize data with D3.js

References