Skip to content

Raspberry Pi humidity & temperature data collector

Notifications You must be signed in to change notification settings

jayd-lee/RPiDataMonitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RPiDataMonitor

You can find a more comprehensive documentation in the report.md.

RPiDataMonitor is a small project I worked on to learn more about writing code for a self-contained device using a single-board Raspberry Pi and various sensors. The project includes the following specs:

  • Raspberry Pi 4 Model B with the Raspbian GNU/Linux 12 operating system
  • DHT11 humidity and temperature sensor
  • 16x2 LCD Panel (w/out i2c controller)

Here is a picture and a fritzing diagram that shows the hardware connections for the device:

RPiDataMonitor picture RPiDataMonitor fritzing diagram

Structure

The project is structured as follows:

├── build                       intermediate build files e.g. *.o (created by make)
├── include                     header files
├── src                         C source files
│   ├── main.c                  Entry point for the CLI
│   ├── db.c                    Functions for db operations
│   ├── humidityTempSensor.c    Record DHT11 data
│   ├── lcd.c                   Outputs data to LCD
│   └── gui.c                   incomplete GUI for the program
├── .gitignore
├── Makefile
└── README.md

Setup

There are three dependencies that is required before building and running this project

Install WiringPi (required for GPIO interfacing)

git clone https://github.com/WiringPi/WiringPi

Intall mariadb and mysqlclient (or any choice of database)

sudo apt-get install mariadb-server
sudo apt-get install default-libmysqlclient-dev

Start MariaDB, and log in as root

sudo systemctl start mariadb
sudo mysql

Create a user (choose a username and password to replace {username} & {password}, without the curly braces)

create user '{username}'@'localhost' identified by '{password}';

Build

Clone repository

git clone https://github.com/jayd-lee/RPiDataMonitor

Build executable

make

Running the program

./build/main

About

Raspberry Pi humidity & temperature data collector

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published