Skip to content

ethan-mfb/humidity-temperature-sensor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

humidity-temperature-sensor

A raspberry pi 0 2 w humidity and temperature sensor

dev environment

  1. install docker desktop
  2. on windows, setup WSL 2, install ubuntu 22 LTS and integrate that with docker desktop
  3. clone the repository (clone into the ubuntu 22 if on windows)
  4. run ./devcontainer.sh

pi setup

Installing the OS

  1. install imager
  2. select the Raspberry Pi OS (64-bit) image
  3. click edit settings
    1. set hostname: rpi20w
    2. username: alpha
    3. password
    4. WLAN: asus 2G
    5. locale
    6. enable the SSH service: rpi20w.local

References

Setting up the web server

  1. SSH into the pi
  2. run sudo apt update and sudo apt upgrade
  3. run sudo apt install apache2 -y
  4. verify by navigating to http://rpi20w.local/

References

Installing Node.js

  1. SSH into the pi
  2. run curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
  3. run nvm install 16

Using the LTS v16 here because onoff only supports v16.

Connecting the sensor

  1. connect the left pin (i.e. +) to pin 1 for 3,3V of power
  2. connect the middle pin (i.e. out) to pin 3 for data
  3. connect the right pin (i.e. -) to pin 6 for ground

raspberry pi 0 2 spec

rpi pin out

sensor spec

Datasheet

spec

interface

About

A raspberry pi 0 2 w humidity and temperature sensor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 61.7%
  • Dockerfile 18.8%
  • Shell 16.2%
  • JavaScript 3.3%