1、内容简介:通过STM32F103芯片驱动OLED显示环境温湿度、土壤温湿度和光照强度,并可以通过按键控制温湿度的预设值进行报警,当湿度小于预设值时开启水泵,并将数据上传到阿里云和手机APP。
2、硬件选型:主控:STM32F103C8T6
OLED:四脚OLED
温湿度检测:DHT11
土壤湿度:土壤湿度检测模块
WIFI:ESP8266-01S
3、主要程序
#include "stm32f10x.h" // Device header
#include "Delay.h"
#include "sys.h"
#include "OLED.h"
#include "DHT11.h"
#include "AD.h"
#include "Key.h"
#include <stdbool.h>
#include "MyUSART.h"
#include "esp.h"
#include "BH1750.h"
#define ADC1_DR_Address ((uint32_t)0x4001244C)//ADC的外设地址
int temperature,Humidity;
int soilHumidity;
float LightLux;
uint8_t MAN=0;
u

最低0.47元/天 解锁文章
2万+

被折叠的 条评论
为什么被折叠?



