项目地址
Maskbugzero/STM32-GP2Y1010AU
一个基于STM32的空气质量检测仪项目
硬件资源
- 战舰V3\精英STM32F103开发板
- GP2Y1010AU气体检测模块
实现功能
连接方式
![电路图](https://img-blog.csdnimg.cn/img_convert/6844ac6cfba37e07c7e80ceb0657f240.png)
![连接方式](https://img-blog.csdnimg.cn/img_convert/b99a27c22e2b0d6e944b85527ca4c78c.png)
主要代码
int main(void)
{
char str[] = "";
u16 PM = 0;
DHT11_Data_TypeDef DHT11_Data;
delay_init();
NVIC_Configuration();
uart_init(115200);
GP2Y_Adc_Init();
OLED_Init();
OLED_ColorTurn