以单片机为控制器的小型GSM模块发送到手机。
功能:温度,湿度,压强,PM2.5显示,并可通过GSM模块讲述据发送到手机
方案:STC12C5A60S2 + DHT11 + BMP085 + GP2Y1050AU0F
读取传感器数据并通过LCD12864显示
将数据通过GSM发送到手机
#include <reg52.h>
#include "bmp085.h"
#include "dht11.h"
#include "pm2_5_sensor.h"
#include "sim900.h"
#include "lcd12864.h"
uchar code table1[] = "温度:";
uchar code table2[] = "湿度:";
uchar code table3[] = "压强:";
uchar code table4[] = "PM2.5:0000ug/m^3";
void DisRefresh(void);
void GSM_SendSensorDat(void);
void delay100ms(void);
void delay200ms(void);
void delay300ms(void);
void main(void)
{
uchar