部分日志信息
This commit is contained in:
1 parent
7f6c30553b
commit
0a20e23704
5 files changed
+58
-20
No files matched your search
@@ -136,11 +136,11 @@ static rt_int32_t ads1115_raw_to_mv(rt_int16_t raw)
|
||||
*/
|
||||
static void ads1115_thread_entry(void *parameter)
|
||||
{
|
||||
rt_int16_t raw = 0 ,mt = 3600;
|
||||
rt_int16_t raw = 0 ,mt = 900;
|
||||
|
||||
while (1)
|
||||
{
|
||||
if(mt>3600)
|
||||
if(mt>900)
|
||||
{
|
||||
if (ads1115_read_channel(0, &raw) == RT_EOK)
|
||||
{
|
||||
@@ -155,6 +155,7 @@ static void ads1115_thread_entry(void *parameter)
|
||||
{
|
||||
mt = 0;
|
||||
}
|
||||
rt_thread_mdelay(1000);
|
||||
|
||||
if (ads1115_read_channel(1, &raw) == RT_EOK)
|
||||
{
|
||||
@@ -164,6 +165,7 @@ static void ads1115_thread_entry(void *parameter)
|
||||
{
|
||||
LOG_E("Failed to read ADS1115 P_CODE");
|
||||
}
|
||||
rt_thread_mdelay(1000);
|
||||
|
||||
if (ads1115_read_channel(2, &raw) == RT_EOK)
|
||||
{
|
||||
@@ -173,6 +175,7 @@ static void ads1115_thread_entry(void *parameter)
|
||||
{
|
||||
LOG_E("Failed to read ADS1115 P_DEV1");
|
||||
}
|
||||
rt_thread_mdelay(1000);
|
||||
|
||||
if (ads1115_read_channel(3, &raw) == RT_EOK)
|
||||
{
|
||||
@@ -182,8 +185,6 @@ static void ads1115_thread_entry(void *parameter)
|
||||
{
|
||||
LOG_E("Failed to read ADS1115 P_DEV2");
|
||||
}
|
||||
|
||||
|
||||
rt_thread_mdelay(1000); // 每 秒读取一次
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ static rt_err_t aht20_init_sensor(void)
|
||||
/* 读取状态字节(可选) */
|
||||
if (aht20_read_data(&status, 1) == RT_EOK)
|
||||
{
|
||||
LOG_D("AHT20 status: 0x%02X", status);
|
||||
LOG_I("AHT20 status: 0x%02X", status);
|
||||
}
|
||||
|
||||
return RT_EOK;
|
||||
|
||||
Reference in new issue
Block a user