102【电路方案】基于单片机的GSM汽车震动报警系统
基于单片机的GSM振动报警系统,两个震动检测模块,检测到震动,GSM短信,电话报警,语音报警,温度过高检测GSM短信,电话报警,可手动通过遥控开闭报警,语音报警,扬声器在板子下面,无线遥控控制开闭,程序,原理图,PCB图源文件。
【资源下载】下载地址如下:
https://docs.qq.com/doc/DTlRSd01BZXNpRUxl
#include <STC89C5xRC.h>
#include "string.h"
#include "sim900a.h"
#include "lcd1602.h"
#include "jingbao.h"
#include "DS18B20.h"
#include "delay.h"
#define STABLE_TIMES 3 //等待上电后稳定
extern u16 m1;
extern bit flagb;
void main(void)
{
u8 i;
LCMInit(); //LCM初始化
SerialInti();
Timer0Init();//TIM0初始化
EA = 1; //开启总中断
DisplayListChar(0, 0, "biyesheji ^_^");
DisplayListChar(0, 1," -----201904");
DelayMS(1000);
DisplayListChar(0, 0," ");
DisplayListChar(0, 1," ");
led1=1;
keyinit();
for(i = 0;i < STABLE_TIMES;i++)//等待网络稳定
{
read_temp();
DisplayListChar(0, 0,"init ");
delay_20ms(20);
DisplayListChar(0, 0,"init. ");
delay_20ms(20);
DisplayListChar(0, 0,"init.. ");
delay_20ms(20);