From d7a066996aedbf175cf82898fb6afb9368af6dbc Mon Sep 17 00:00:00 2001 From: dgjames <1943357252@qq.com> Date: Sat, 15 Mar 2025 07:30:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83=EF=BC=8C=E6=8A=8Apm2.5?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E5=88=B0sensor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/PM2.5.C | 57 ---------------------------------------- applications/myproject.c | 5 ++-- 2 files changed, 3 insertions(+), 59 deletions(-) delete mode 100644 applications/PM2.5.C diff --git a/applications/PM2.5.C b/applications/PM2.5.C deleted file mode 100644 index 8272962..0000000 --- a/applications/PM2.5.C +++ /dev/null @@ -1,57 +0,0 @@ - -// #include -// #include -// #include "math.h" -// #include -// #include -// #ifndef RT_USING_NANO -// #endif /* RT_USING_NANO */ -// #define PM25_READ_TIMES 20 -// #define GPIO_PIN GET_PIN(G, 5) -// extern float ADC_Read(); -// extern float ADC1_Read(); -// float PM25_GetData(void) -// { -// int ADCVal; -// int dustVal = 0; -// float Voltage; - -// rt_pin_write(GPIO_PIN, PIN_HIGH);//置1 开启内部LED - -// rt_hw_us_delay(280); -// ADCVal = ADC1_Read(); -// rt_hw_us_delay(25); -// rt_pin_write(GPIO_PIN, PIN_LOW); //置0 关闭内部LED -// rt_hw_us_delay(9680); //需要脉宽比0.32ms/10ms的PWM信号驱动传感器中的LED - -// Voltage = 3.3f * ADCVal / 4096.f * 2; //获得AO输出口的电压值 - -// dustVal = (0.17*Voltage-0.1)*1000; //乘以1000单位换成ug/m3// - -// if (dustVal < 0) -// dustVal = 0; //限位// - -// if (dustVal>500) -// dustVal=500; - -// return dustVal; -// } - -// /** -// * @brief 平均值滤波法 -// * @param 无 -// * @retval 返回滤波后的数据 -// */ -// float Get_PM25_Average_Data(void) -// { -// float temp_val=0; -// float t; -// for(t=0;t