-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,45 @@ | ||
# EspTemperatureMonitor | ||
This project uses esp8266 and python to measure temperatures and write to mysql database. | ||
This project uses esp8266 and python to measure temperatures and write to MySQL database. | ||
|
||
# Installation | ||
|
||
# Requirements | ||
Python >= 3.12 | ||
Pip | ||
MySql database | ||
Esp8266 | ||
|
||
## pip | ||
Install packages using pip `pip install -r requirements.txt` | ||
|
||
## Mysql | ||
You need to create a database named **esp_data**. Then you can use this script to create a table: | ||
|
||
``CREATE TABLE 'temp_data' ( | ||
'id' int NOT NULL AUTO_INCREMENT, | ||
'temp' float NOT NULL, | ||
'time' timestamp NOT NULL, | ||
'sensor_id' int NOT NULL, | ||
PRIMARY KEY ('id') | ||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;`` | ||
|
||
or you can run ``setup.py`` file. | ||
|
||
|
||
### Esp8266 | ||
To use this project you need an esp8266 with wifi support. You need only | ||
1. port D7, 3v, GND. | ||
2. a temperature sensor like 0750C3 | ||
3. installed esp8266 plugin (fast [tutorial]( https://www.youtube.com/watch?v=OC9wYhv6juM&ab_channel=RuiSantos "tutorial")) | ||
4. know your wifi ssid and password | ||
|
||
#### Connecting esp8266 board | ||
Here is a photo of the schema that is used: | ||
|
||
|
||
 | ||
|
||
> [!TIP] | ||
> You can use any esp8266 board and connect up to 8 sensors to pin D7. | ||
### End |