基于安卓和ESP8266的室内灯光控器设计摘要社会在发展,科技在进步,智能手机几乎人手一部,Wi-Fi作为无线通信技术已经非常成熟,人们随时可以连接Wi-Fi上网冲浪,如今各种产品和设备都朝着智能化方向发展。使用Wi-Fi技术来对各种智能设备进行远程控制更加符合实际需求。通过物联网技术实现对智能设备进行无线远程控制,极大方便了人们的生产生活。本设计是基于物联网开发一款简单实用的室内灯光控制器,使用智能手机对室内灯光进行无线控制。通过使用ESP8266芯片和STM32F103单片机组成控制端部分,使用ESP8266模块无线传输数据,对室内灯光控制。并搭建一个服务器创建数据库进行用户管理和控制器的管理。创建安卓手机应用,手机连接局域网实现用户登陆注册,灯光控制器的增删改查等功能。实现手机控制室内灯光完成此次设计。关键词:STM32F103AndroidWi-FiESP8266IDesignofIndoorLightingControllerBasedonAndroidandESP8266ABSTRACTInthedevelopmentofsociety,scienceandtechnologyinprogress,smartphonesalmostonehand,Wi-Fiasawirelesscommunicationtechnologyhasbeenverymature,peoplecanconnecttoWi-Fisurfingatanytime,nowallkindsofproductsandequipmentaredevelopingtowardsthedirectionofintelligence.UsingWi-Fitechnologyforremotecontrolofvariousintelligentdevicesismoreinlinewiththeactualneeds.ThroughtheInternetofthingstechnologytoachieveintelligentremotewirelesscontroldevices,greatlyfacilitatedpeople'sproductionandlife.ThisdesignisbasedontheInternetofthingstodevelopasimpleandpracticalindoorlightingcontroller,usingsmartphonestocontrolindoorlightingwireless.ThecontrolpartiscomposedofESP8266chipandSTM32F103microcontroller,andtheESP8266moduleisusedforwirelessdatatransmissiontocontrolindoorlighting.Andbuildaservertocreateadatabaseforusermanagementandcontrollermanagement.CreateAndroidmobileapplications,mobileLANconnectiontoachieveuserloginregistration,addanddeletethelightingcontrollerandotherfunctions.Themobilephonecontrolsindoorlightingtocompletethedesign.KEYWORDS:STM32F103AndroidWi-FiESP8266II目录摘要..............................................................ⅠABSTRACT.........................................................................................................Ⅱ前言..............................................................11概述..............................................................21.1设计背景....................................................21.2应用前景....................................................22灯光控制器总体设计方案............................................22.1总体设计概述................................................22.2总体设计的需求分析..........................................22.3系统整体架构的设计..........................................32.3.1网络通信技术方案的选择................................32.3.2控制终端操作系统的选择................................42.3.3无线通信协议的选择....................................53硬件控制器的设计与实现............................................53.1控制器的主要芯片和模块......................................63.1.1主控芯片STM32F103....................................63.1.2ESP8266模块..........................................73.1.3LED灯的控制电路......................................93.1.4继电器控制电路........................................93.1.5电源供电电路.........................................103.2控制器的程序的设计与实现...................................113.2.1控制器程序流程图.....................................113.2.2Wi-Fi模块的程序设计............................