A raspberry pi 0 2 w humidity and temperature sensor
- Raspberry Pi 0 2 W
- HiLetgo DHT22/AM23 (ASAIR AM2302)
- Raspberry Pi Tutorial: How to Use the DHT-22
- onoff
- install docker desktop
- on windows, setup WSL 2, install ubuntu 22 LTS and integrate that with docker desktop
- clone the repository (clone into the ubuntu 22 if on windows)
- run
./devcontainer.sh
- install imager
- select the Raspberry Pi OS (64-bit) image
- click edit settings
- set hostname:
rpi20w
- username:
alpha
- password
- WLAN: asus 2G
- locale
- enable the SSH service:
rpi20w.local
- set hostname:
References
- https://www.raspberrypi.com/documentation/computers/remote-access.html#ssh
- https://www.raspberrypi.com/documentation/computers/getting-started.html#raspberry-pi-imager
- SSH into the pi
- run
sudo apt update
andsudo apt upgrade
- run
sudo apt install apache2 -y
- verify by navigating to http://rpi20w.local/
References
- SSH into the pi
- run
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
- run
nvm install 16
Using the LTS v16 here because onoff only supports v16.
- connect the left pin (i.e. +) to pin 1 for 3,3V of power
- connect the middle pin (i.e. out) to pin 3 for data
- connect the right pin (i.e. -) to pin 6 for ground