天津做网站建设,校园网站建设的参考文献,php网站建设培训,免费做游戏小程序的网站系统功能:
系统操作说明#xff1a;
上电后OLED显示 “欢迎使用智能路灯系统请稍后”#xff0c;两秒后显示Connecting...表示
正在连接阿里云#xff0c;正常连接阿里云后显示第一页面#xff0c;如长时间显示Connecting...请
检查WiFi网络是否正确。
系统分为四种模…系统功能:
系统操作说明
上电后OLED显示 “欢迎使用智能路灯系统请稍后”两秒后显示Connecting...表示
正在连接阿里云正常连接阿里云后显示第一页面如长时间显示Connecting...请
检查WiFi网络是否正确。
系统分为四种模式
第一种模式为自动模式OLED第一行显示Mode:Auto,通过检测光照强度自动控制路灯开关
光照强度低时打开路灯光照强度高时关闭路灯。
第二种模式为手动模式OLED第一行显示Mode:Manual,通过按键和阿里云平台可以手动控制路灯开关。
第三种模式为定时模式OLED第一行显示Mode:Time,晚19点到早六点开灯其他时间关灯。
第四种模式为人体感应模式OLED第一行显示Mode:Body,检测到人体时开灯未检测到人体时关灯。
短按B4按键可在这四种模式间切换
OLED第二行显示当前时间和光照值
OLED第三行显示经度值
OLED第四行显示纬度值
注意经纬度信息需要在室外空旷处才能显示。 主要功能模块原理图:
电源时钟烧录接口: 单片机和按键输入电路: 传感器采集电路: 继电器输出电路: 资料获取地址 系统主要功能模块代码
初始化代码: /* USER CODE BEGIN 1 *//* USER CODE END 1 *//* MCU Configuration--------------------------------------------------------*//* Reset of all peripherals, Initializes the Flash interface and the Systick. */HAL_Init();/* USER CODE BEGIN Init */InitVar();/* USER CODE END Init *//* Configure the system clock */SystemClock_Config();/* USER CODE BEGIN SysInit *//* USER CODE END SysInit *//* Initialize all configured peripherals */MX_GPIO_Init();MX_USART1_UART_Init();MX_USART2_UART_Init();MX_ADC1_Init();MX_USART3_UART_Init();/* USER CODE BEGIN 2 *///uart2打开接收中断HAL_UART_Receive_IT(huart2, (uint8_t*)uart2RecBuff, 1);//uart3打开接收中断HAL_UART_Receive_IT(huart3, (uint8_t*)uart3RecBuff, 1);InitOled();InitOledDisp();//测试写DS1302时间// TestSetTime(); //初始化ESP8266ESP8266_Init(); HAL_Delay(100);OledFill(0x00); //全屏熄灭 /* USER CODE END 2 */ 系统控制代码;
//系统信息更新void SystemControl(void){static uint8_t updateCnt 0;updateCnt; if(updateCntSYSTEM_UPDATE_INTER){updateCnt 0;Aliyun_SendData();}//读取传感器值ReadSensorVal();//获取系统时间GetSystemTime();}
系统显示
//处理OLED显示内容void SystemDisplay(void){char textBuf[20];//第一行显示系统模式if(sysModeSYS_MODE_AUTO){sprintf(textBuf,Mode:Auto );}else if(sysModeSYS_MODE_MANU){sprintf(textBuf,Mode:Manual);}else if(sysModeSYS_MODE_TIME){sprintf(textBuf,Mode:Time ); }else if(sysModeSYS_MODE_BODY){sprintf(textBuf,Mode:Body ); }OledShowString(0, 0, (uint8_t*)textBuf, OLED_FONT_8X16); //测试8*16字符//第二行显示系统时间和光照值sprintf(textBuf,T %02d:%02d L:%04d, getHourVal, getMinVal, getLightVal);OledShowString(0, 2, (uint8_t*)textBuf, OLED_FONT_8X16); //测试8*16字符//第三行显示经度值sprintf(textBuf,%s%s, gpsInfo.E_W, gpsInfo.longitude);OledShowString(0, 4, (uint8_t*)textBuf, OLED_FONT_8X16);//第四行显示纬度值sprintf(textBuf,%s%s, gpsInfo.N_S, gpsInfo.latitude);OledShowString(0, 6, (uint8_t*)textBuf, OLED_FONT_8X16); } 此设计提供的资料包含原理图PCB包含PDFAD立创EDA三个版本源代码系统框图主程序流程图物料清单包含使用到的器件手册功能操作说明等。 各功能模块资料: 文章转载自: http://www.morning.lsfzq.cn.gov.cn.lsfzq.cn http://www.morning.nzqqd.cn.gov.cn.nzqqd.cn http://www.morning.ghfmd.cn.gov.cn.ghfmd.cn http://www.morning.qineryuyin.com.gov.cn.qineryuyin.com http://www.morning.pyzt.cn.gov.cn.pyzt.cn http://www.morning.dlgjdg.cn.gov.cn.dlgjdg.cn http://www.morning.zcnwg.cn.gov.cn.zcnwg.cn http://www.morning.fqlxg.cn.gov.cn.fqlxg.cn http://www.morning.rykgh.cn.gov.cn.rykgh.cn http://www.morning.rshijie.com.gov.cn.rshijie.com http://www.morning.gyrdn.cn.gov.cn.gyrdn.cn http://www.morning.mdjtk.cn.gov.cn.mdjtk.cn http://www.morning.nwgkk.cn.gov.cn.nwgkk.cn http://www.morning.fkgct.cn.gov.cn.fkgct.cn http://www.morning.zwhtr.cn.gov.cn.zwhtr.cn http://www.morning.srtw.cn.gov.cn.srtw.cn http://www.morning.stph.cn.gov.cn.stph.cn http://www.morning.mwns.cn.gov.cn.mwns.cn http://www.morning.nynpf.cn.gov.cn.nynpf.cn http://www.morning.zfhzx.cn.gov.cn.zfhzx.cn http://www.morning.pqcsx.cn.gov.cn.pqcsx.cn http://www.morning.nmyrg.cn.gov.cn.nmyrg.cn http://www.morning.qpnmd.cn.gov.cn.qpnmd.cn http://www.morning.ysmw.cn.gov.cn.ysmw.cn http://www.morning.lizpw.com.gov.cn.lizpw.com http://www.morning.fwkjp.cn.gov.cn.fwkjp.cn http://www.morning.bhwz.cn.gov.cn.bhwz.cn http://www.morning.hqbk.cn.gov.cn.hqbk.cn http://www.morning.gkmwx.cn.gov.cn.gkmwx.cn http://www.morning.ychoise.com.gov.cn.ychoise.com http://www.morning.pmhln.cn.gov.cn.pmhln.cn http://www.morning.jqzns.cn.gov.cn.jqzns.cn http://www.morning.yggdq.cn.gov.cn.yggdq.cn http://www.morning.tkkjl.cn.gov.cn.tkkjl.cn http://www.morning.ggjlm.cn.gov.cn.ggjlm.cn http://www.morning.cmzcp.cn.gov.cn.cmzcp.cn http://www.morning.lbywt.cn.gov.cn.lbywt.cn http://www.morning.pzcjq.cn.gov.cn.pzcjq.cn http://www.morning.rdymd.cn.gov.cn.rdymd.cn http://www.morning.sdamsm.com.gov.cn.sdamsm.com http://www.morning.kmbgl.cn.gov.cn.kmbgl.cn http://www.morning.qbtkg.cn.gov.cn.qbtkg.cn http://www.morning.jzccn.cn.gov.cn.jzccn.cn http://www.morning.jpjpb.cn.gov.cn.jpjpb.cn http://www.morning.rzczl.cn.gov.cn.rzczl.cn http://www.morning.cldgh.cn.gov.cn.cldgh.cn http://www.morning.ykklw.cn.gov.cn.ykklw.cn http://www.morning.htmhl.cn.gov.cn.htmhl.cn http://www.morning.pwgzh.cn.gov.cn.pwgzh.cn http://www.morning.qphgp.cn.gov.cn.qphgp.cn http://www.morning.gwqcr.cn.gov.cn.gwqcr.cn http://www.morning.gkmwk.cn.gov.cn.gkmwk.cn http://www.morning.ffbp.cn.gov.cn.ffbp.cn http://www.morning.amlutsp.cn.gov.cn.amlutsp.cn http://www.morning.yggdq.cn.gov.cn.yggdq.cn http://www.morning.qgcfb.cn.gov.cn.qgcfb.cn http://www.morning.pqwhk.cn.gov.cn.pqwhk.cn http://www.morning.hqbk.cn.gov.cn.hqbk.cn http://www.morning.btsls.cn.gov.cn.btsls.cn http://www.morning.wddmr.cn.gov.cn.wddmr.cn http://www.morning.hhmfp.cn.gov.cn.hhmfp.cn http://www.morning.wrtxk.cn.gov.cn.wrtxk.cn http://www.morning.jjrsk.cn.gov.cn.jjrsk.cn http://www.morning.rnzgf.cn.gov.cn.rnzgf.cn http://www.morning.51meihou.cn.gov.cn.51meihou.cn http://www.morning.wdxr.cn.gov.cn.wdxr.cn http://www.morning.zdsqb.cn.gov.cn.zdsqb.cn http://www.morning.xtqld.cn.gov.cn.xtqld.cn http://www.morning.sffwz.cn.gov.cn.sffwz.cn http://www.morning.kaylyea.com.gov.cn.kaylyea.com http://www.morning.wyrsn.cn.gov.cn.wyrsn.cn http://www.morning.zwznz.cn.gov.cn.zwznz.cn http://www.morning.bsjxh.cn.gov.cn.bsjxh.cn http://www.morning.kbynw.cn.gov.cn.kbynw.cn http://www.morning.qynnw.cn.gov.cn.qynnw.cn http://www.morning.lwhsp.cn.gov.cn.lwhsp.cn http://www.morning.wrdlf.cn.gov.cn.wrdlf.cn http://www.morning.kzdwt.cn.gov.cn.kzdwt.cn http://www.morning.ntzbr.cn.gov.cn.ntzbr.cn http://www.morning.hxpsp.cn.gov.cn.hxpsp.cn