Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update file CamBienNhietAmDriver.h #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 31 additions & 12 deletions classLed_BT/CamBienNhietAmDriver.h
Original file line number Diff line number Diff line change
@@ -1,31 +1,50 @@
/* ý nghĩa: Điều hiển thị trên màn hình lcd 16x2 i2c
* Người viết: Tuyền
* cập nhật cuối: 07/07/2022
*
* cập nhật cuối: 07/07/2022
*
*/
#include <DHT.h>

#ifdef DHT_SENSOR
DHT camBienNhietAm(DHT_PIN, DHT11);
DHT CamBienNhietAm(DHT_PIN, DHT11);
#endif
#ifdef SHT_SENSOR
//
#endif

void KhoiTaoNhietAm();
int docNhietDo();
int docDoAm();
/**
* @brief Khoi tao cam bien nhiet do, do am
* @paramin None
* @paramout None
* @return None
*/
void KhoiTaoNhietAm_KhoiTao();

/**
* @brief Doc gia tri nhiet do
* @paramin None
* @paramout None
* @return gia tri nhiet do
*/
int DocNhietDo_Doc();

/**
* @brief Doc gia tri do am
* @paramin None
* @paramout None
* @return gia tri do am
*/
int DocDoAm_Doc();

void KhoiTaoNhietAm()
void KhoiTaoNhietAm_KhoiTao()
{
camBienNhietAm.begin();
CamBienNhietAm.begin();
}
int docNhietDo()
int DocNhietDo_Doc()
{
return (int)camBienNhietAm.readTemperature();
return (int)CamBienNhietAm.readTemperature();
}
int docDoAm()
int DocDoAm_Doc()
{
return (int)camBienNhietAm.readHumidity();
return (int)CamBienNhietAm.readHumidity();
}