NEW: #1 Mysql support, makefile and readme update, sensor struct update

This commit is contained in:
2017-01-28 13:56:47 +01:00
parent 2167638d2b
commit c8182dafec
7 changed files with 104 additions and 10 deletions

View File

@@ -1 +1,20 @@
# dht22 Temperature Stats
# dht22 Temperature Stats
## mySQL
Login: mysql --user=root --password=password
Creating new user: create user 'dhtuser'@'localhost' IDENTIFIED BY 'raspberry';
Permissions: grant all privileges on *.* to 'dhtuser'@'localhost';
Create database: create database dhtstats;
Use database: use dhtstats
Create new table: CREATE TABLE stats (id MEDIUMINT NOT NULL AUTO_INCREMENT, pin int not null, humidity FLOAT NOT NULL, temperature FLOAT NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) );
## Dependencies
sudo apt-get install libmysqlclient-dev libmysqld-dev mysql