├── README.md ├── androidControl ├── .gitignore ├── .idea │ ├── codeStyles │ │ └── Project.xml │ ├── gradle.xml │ ├── misc.xml │ └── runConfigurations.xml ├── app │ ├── .gitignore │ ├── .idea │ │ ├── .name │ │ ├── caches │ │ │ └── build_file_checksums.ser │ │ ├── codeStyles │ │ │ └── Project.xml │ │ ├── gradle.xml │ │ ├── libraries │ │ │ ├── Gradle__androidx_activity_activity_1_0_0_aar.xml │ │ │ ├── Gradle__androidx_annotation_annotation_1_1_0_jar.xml │ │ │ ├── Gradle__androidx_appcompat_appcompat_1_1_0_aar.xml │ │ │ ├── Gradle__androidx_appcompat_appcompat_resources_1_1_0_aar.xml │ │ │ ├── Gradle__androidx_arch_core_core_common_2_1_0_jar.xml │ │ │ ├── Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml │ │ │ ├── Gradle__androidx_collection_collection_1_1_0_jar.xml │ │ │ ├── Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml │ │ │ ├── Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml │ │ │ ├── Gradle__androidx_core_core_1_1_0_aar.xml │ │ │ ├── Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml │ │ │ ├── Gradle__androidx_customview_customview_1_0_0_aar.xml │ │ │ ├── Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml │ │ │ ├── Gradle__androidx_fragment_fragment_1_1_0_aar.xml │ │ │ ├── Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml │ │ │ ├── Gradle__androidx_lifecycle_lifecycle_common_2_1_0_jar.xml │ │ │ ├── Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml │ │ │ ├── Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml │ │ │ ├── Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml │ │ │ ├── Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml │ │ │ ├── Gradle__androidx_loader_loader_1_0_0_aar.xml │ │ │ ├── Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml │ │ │ ├── Gradle__androidx_test_core_1_2_0_aar.xml │ │ │ ├── Gradle__androidx_test_espresso_espresso_core_3_2_0_aar.xml │ │ │ ├── Gradle__androidx_test_espresso_espresso_idling_resource_3_2_0_aar.xml │ │ │ ├── Gradle__androidx_test_ext_junit_1_1_1_aar.xml │ │ │ ├── Gradle__androidx_test_monitor_1_2_0_aar.xml │ │ │ ├── Gradle__androidx_test_runner_1_2_0_aar.xml │ │ │ ├── Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml │ │ │ ├── Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml │ │ │ ├── Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml │ │ │ ├── Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml │ │ │ ├── Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml │ │ │ ├── Gradle__com_squareup_javawriter_2_1_1_jar.xml │ │ │ ├── Gradle__javax_inject_javax_inject_1_jar.xml │ │ │ ├── Gradle__junit_junit_4_12_jar.xml │ │ │ ├── Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml │ │ │ ├── Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml │ │ │ ├── Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml │ │ │ └── Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml │ │ ├── misc.xml │ │ ├── modules.xml │ │ ├── runConfigurations.xml │ │ └── workspace.xml │ ├── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── local.properties │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── led │ │ │ └── ExampleInstrumentedTest.java │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── led │ │ │ │ └── MainActivity.java │ │ └── res │ │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── drawable │ │ │ └── ic_launcher_background.xml │ │ │ ├── layout │ │ │ └── activity_main.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── example │ │ └── led │ │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── photo ├── app界面.png ├── cp2102串口.png ├── esp8266.png ├── led_control.png ├── led_power.png ├── s-tlink.png ├── stm32.png └── 云端数据.png └── stm32Project ├── CMSIS ├── Release_Notes.html ├── core_cm3.c ├── core_cm3.h ├── startup │ ├── TrueSTUDIO │ │ ├── startup_stm32f10x_cl.s │ │ ├── startup_stm32f10x_hd.s │ │ ├── startup_stm32f10x_hd_vl.s │ │ ├── startup_stm32f10x_ld.s │ │ ├── startup_stm32f10x_ld_vl.s │ │ ├── startup_stm32f10x_md.s │ │ ├── startup_stm32f10x_md_vl.s │ │ └── startup_stm32f10x_xl.s │ ├── arm │ │ ├── startup_stm32f10x_cl.s │ │ ├── startup_stm32f10x_hd.s │ │ ├── startup_stm32f10x_hd_vl.s │ │ ├── startup_stm32f10x_ld.s │ │ ├── startup_stm32f10x_ld_vl.s │ │ ├── startup_stm32f10x_md.s │ │ ├── startup_stm32f10x_md_vl.s │ │ └── startup_stm32f10x_xl.s │ ├── gcc_ride7 │ │ ├── startup_stm32f10x_cl.s │ │ ├── startup_stm32f10x_hd.s │ │ ├── startup_stm32f10x_hd_vl.s │ │ ├── startup_stm32f10x_ld.s │ │ ├── startup_stm32f10x_ld_vl.s │ │ ├── startup_stm32f10x_md.s │ │ ├── startup_stm32f10x_md_vl.s │ │ └── startup_stm32f10x_xl.s │ └── iar │ │ ├── startup_stm32f10x_cl.s │ │ ├── startup_stm32f10x_hd.s │ │ ├── startup_stm32f10x_hd_vl.s │ │ ├── startup_stm32f10x_ld.s │ │ ├── startup_stm32f10x_ld_vl.s │ │ ├── startup_stm32f10x_md.s │ │ ├── startup_stm32f10x_md_vl.s │ │ └── startup_stm32f10x_xl.s ├── stm32f10x.h ├── system_stm32f10x.c └── system_stm32f10x.h ├── DebugConfig └── Target_1_STM32F103C8_1.0.0.dbgconf ├── FWLIB ├── inc │ ├── delay.h │ ├── misc.h │ ├── stm32_assert_template.h │ ├── stm32f10x_adc.h │ ├── stm32f10x_bkp.h │ ├── stm32f10x_can.h │ ├── stm32f10x_cec.h │ ├── stm32f10x_crc.h │ ├── stm32f10x_dac.h │ ├── stm32f10x_dbgmcu.h │ ├── stm32f10x_dma.h │ ├── stm32f10x_exti.h │ ├── stm32f10x_flash.h │ ├── stm32f10x_fsmc.h │ ├── stm32f10x_gpio.h │ ├── stm32f10x_i2c.h │ ├── stm32f10x_iwdg.h │ ├── stm32f10x_pwr.h │ ├── stm32f10x_rcc.h │ ├── stm32f10x_rtc.h │ ├── stm32f10x_sdio.h │ ├── stm32f10x_spi.h │ ├── stm32f10x_tim.h │ ├── stm32f10x_usart.h │ ├── stm32f10x_wwdg.h │ ├── stm32f1xx_hal.h │ ├── stm32f1xx_hal_adc.h │ ├── stm32f1xx_hal_adc_ex.h │ ├── stm32f1xx_hal_can.h │ ├── stm32f1xx_hal_can_ex.h │ ├── stm32f1xx_hal_cec.h │ ├── stm32f1xx_hal_conf_template.h │ ├── stm32f1xx_hal_cortex.h │ ├── stm32f1xx_hal_crc.h │ ├── stm32f1xx_hal_dac.h │ ├── stm32f1xx_hal_dac_ex.h │ ├── stm32f1xx_hal_def.h │ ├── stm32f1xx_hal_dma.h │ ├── stm32f1xx_hal_dma_ex.h │ ├── stm32f1xx_hal_eth.h │ ├── stm32f1xx_hal_flash.h │ ├── stm32f1xx_hal_flash_ex.h │ ├── stm32f1xx_hal_gpio.h │ ├── stm32f1xx_hal_gpio_ex.h │ ├── stm32f1xx_hal_hcd.h │ ├── stm32f1xx_hal_i2c.h │ ├── stm32f1xx_hal_i2s.h │ ├── stm32f1xx_hal_irda.h │ ├── stm32f1xx_hal_iwdg.h │ ├── stm32f1xx_hal_mmc.h │ ├── stm32f1xx_hal_nand.h │ ├── stm32f1xx_hal_nor.h │ ├── stm32f1xx_hal_pccard.h │ ├── stm32f1xx_hal_pcd.h │ ├── stm32f1xx_hal_pcd_ex.h │ ├── stm32f1xx_hal_pwr.h │ ├── stm32f1xx_hal_rcc.h │ ├── stm32f1xx_hal_rcc_ex.h │ ├── stm32f1xx_hal_rtc.h │ ├── stm32f1xx_hal_rtc_ex.h │ ├── stm32f1xx_hal_sd.h │ ├── stm32f1xx_hal_smartcard.h │ ├── stm32f1xx_hal_spi.h │ ├── stm32f1xx_hal_sram.h │ ├── stm32f1xx_hal_tim.h │ ├── stm32f1xx_hal_tim_ex.h │ ├── stm32f1xx_hal_uart.h │ ├── stm32f1xx_hal_usart.h │ ├── stm32f1xx_hal_wwdg.h │ ├── stm32f1xx_ll_adc.h │ ├── stm32f1xx_ll_bus.h │ ├── stm32f1xx_ll_cortex.h │ ├── stm32f1xx_ll_crc.h │ ├── stm32f1xx_ll_dac.h │ ├── stm32f1xx_ll_dma.h │ ├── stm32f1xx_ll_exti.h │ ├── stm32f1xx_ll_fsmc.h │ ├── stm32f1xx_ll_gpio.h │ ├── stm32f1xx_ll_i2c.h │ ├── stm32f1xx_ll_iwdg.h │ ├── stm32f1xx_ll_pwr.h │ ├── stm32f1xx_ll_rcc.h │ ├── stm32f1xx_ll_rtc.h │ ├── stm32f1xx_ll_sdmmc.h │ ├── stm32f1xx_ll_spi.h │ ├── stm32f1xx_ll_system.h │ ├── stm32f1xx_ll_tim.h │ ├── stm32f1xx_ll_usart.h │ ├── stm32f1xx_ll_usb.h │ ├── stm32f1xx_ll_utils.h │ ├── stm32f1xx_ll_wwdg.h │ └── usart.h └── src │ ├── misc.c │ ├── stm32f10x_adc.c │ ├── stm32f10x_bkp.c │ ├── stm32f10x_can.c │ ├── stm32f10x_cec.c │ ├── stm32f10x_crc.c │ ├── stm32f10x_dac.c │ ├── stm32f10x_dbgmcu.c │ ├── stm32f10x_dma.c │ ├── stm32f10x_exti.c │ ├── stm32f10x_flash.c │ ├── stm32f10x_fsmc.c │ ├── stm32f10x_gpio.c │ ├── stm32f10x_i2c.c │ ├── stm32f10x_iwdg.c │ ├── stm32f10x_pwr.c │ ├── stm32f10x_rcc.c │ ├── stm32f10x_rtc.c │ ├── stm32f10x_sdio.c │ ├── stm32f10x_spi.c │ ├── stm32f10x_tim.c │ ├── stm32f10x_usart.c │ ├── stm32f10x_wwdg.c │ ├── stm32f1xx_hal.c │ ├── stm32f1xx_hal_adc.c │ ├── stm32f1xx_hal_adc_ex.c │ ├── stm32f1xx_hal_can.c │ ├── stm32f1xx_hal_cec.c │ ├── stm32f1xx_hal_cortex.c │ ├── stm32f1xx_hal_crc.c │ ├── stm32f1xx_hal_dac.c │ ├── stm32f1xx_hal_dac_ex.c │ ├── stm32f1xx_hal_dma.c │ ├── stm32f1xx_hal_eth.c │ ├── stm32f1xx_hal_flash.c │ ├── stm32f1xx_hal_flash_ex.c │ ├── stm32f1xx_hal_gpio.c │ ├── stm32f1xx_hal_gpio_ex.c │ ├── stm32f1xx_hal_hcd.c │ ├── stm32f1xx_hal_i2c.c │ ├── stm32f1xx_hal_i2s.c │ ├── stm32f1xx_hal_irda.c │ ├── stm32f1xx_hal_iwdg.c │ ├── stm32f1xx_hal_mmc.c │ ├── stm32f1xx_hal_msp_template.c │ ├── stm32f1xx_hal_nand.c │ ├── stm32f1xx_hal_nor.c │ ├── stm32f1xx_hal_pccard.c │ ├── stm32f1xx_hal_pcd.c │ ├── stm32f1xx_hal_pcd_ex.c │ ├── stm32f1xx_hal_pwr.c │ ├── stm32f1xx_hal_rcc.c │ ├── stm32f1xx_hal_rcc_ex.c │ ├── stm32f1xx_hal_rtc.c │ ├── stm32f1xx_hal_rtc_ex.c │ ├── stm32f1xx_hal_sd.c │ ├── stm32f1xx_hal_smartcard.c │ ├── stm32f1xx_hal_spi.c │ ├── stm32f1xx_hal_spi_ex.c │ ├── stm32f1xx_hal_sram.c │ ├── stm32f1xx_hal_tim.c │ ├── stm32f1xx_hal_tim_ex.c │ ├── stm32f1xx_hal_timebase_rtc_alarm_template.c │ ├── stm32f1xx_hal_timebase_tim_template.c │ ├── stm32f1xx_hal_uart.c │ ├── stm32f1xx_hal_usart.c │ ├── stm32f1xx_hal_wwdg.c │ ├── stm32f1xx_ll_adc.c │ ├── stm32f1xx_ll_crc.c │ ├── stm32f1xx_ll_dac.c │ ├── stm32f1xx_ll_dma.c │ ├── stm32f1xx_ll_exti.c │ ├── stm32f1xx_ll_fsmc.c │ ├── stm32f1xx_ll_gpio.c │ ├── stm32f1xx_ll_i2c.c │ ├── stm32f1xx_ll_pwr.c │ ├── stm32f1xx_ll_rcc.c │ ├── stm32f1xx_ll_rtc.c │ ├── stm32f1xx_ll_sdmmc.c │ ├── stm32f1xx_ll_spi.c │ ├── stm32f1xx_ll_tim.c │ ├── stm32f1xx_ll_usart.c │ ├── stm32f1xx_ll_usb.c │ ├── stm32f1xx_ll_utils.c │ └── usart.c ├── Listings ├── Lightcontrol.map ├── smartlamp.map ├── startup_stm32f10x_hd.lst ├── startup_stm32f10x_ld.lst └── startup_stm32f10x_md.lst ├── Objects ├── adc.crf ├── adc.d ├── adc.o ├── core_cm3.crf ├── core_cm3.d ├── core_cm3.o ├── delay.crf ├── delay.d ├── delay.o ├── edpkit.crf ├── edpkit.d ├── edpkit.o ├── esp8266.crf ├── esp8266.d ├── esp8266.o ├── esp8266_send.crf ├── esp8266_send.d ├── esp8266_send.o ├── key.crf ├── key.d ├── key.o ├── led.crf ├── led.d ├── led.o ├── main.crf ├── main.d ├── main.o ├── misc.crf ├── misc.d ├── misc.o ├── onenet.crf ├── onenet.d ├── onenet.o ├── smartlamp.axf ├── smartlamp.build_log.htm ├── smartlamp.htm ├── smartlamp.lnp ├── smartlamp.sct ├── smartlamp_Target 1.dep ├── smartlamp_sct.Bak ├── startup_stm32f10x_hd.d ├── startup_stm32f10x_hd.o ├── startup_stm32f10x_hd_1.d ├── startup_stm32f10x_hd_1.o ├── stm32f10x_adc.crf ├── stm32f10x_adc.d ├── stm32f10x_adc.o ├── stm32f10x_bkp.crf ├── stm32f10x_bkp.d ├── stm32f10x_bkp.o ├── stm32f10x_can.crf ├── stm32f10x_can.d ├── stm32f10x_can.o ├── stm32f10x_cec.crf ├── stm32f10x_cec.d ├── stm32f10x_cec.o ├── stm32f10x_crc.crf ├── stm32f10x_crc.d ├── stm32f10x_crc.o ├── stm32f10x_dac.crf ├── stm32f10x_dac.d ├── stm32f10x_dac.o ├── stm32f10x_dbgmcu.crf ├── stm32f10x_dbgmcu.d ├── stm32f10x_dbgmcu.o ├── stm32f10x_dma.crf ├── stm32f10x_dma.d ├── stm32f10x_dma.o ├── stm32f10x_exti.crf ├── stm32f10x_exti.d ├── stm32f10x_exti.o ├── stm32f10x_flash.crf ├── stm32f10x_flash.d ├── stm32f10x_flash.o ├── stm32f10x_fsmc.crf ├── stm32f10x_fsmc.d ├── stm32f10x_fsmc.o ├── stm32f10x_gpio.crf ├── stm32f10x_gpio.d ├── stm32f10x_gpio.o ├── stm32f10x_gpio_1.crf ├── stm32f10x_gpio_1.d ├── stm32f10x_gpio_1.o ├── stm32f10x_i2c.crf ├── stm32f10x_i2c.d ├── stm32f10x_i2c.o ├── stm32f10x_it.crf ├── stm32f10x_it.d ├── stm32f10x_it.o ├── stm32f10x_iwdg.crf ├── stm32f10x_iwdg.d ├── stm32f10x_iwdg.o ├── stm32f10x_pwr.crf ├── stm32f10x_pwr.d ├── stm32f10x_pwr.o ├── stm32f10x_rcc.crf ├── stm32f10x_rcc.d ├── stm32f10x_rcc.o ├── stm32f10x_rtc.crf ├── stm32f10x_rtc.d ├── stm32f10x_rtc.o ├── stm32f10x_sdio.crf ├── stm32f10x_sdio.d ├── stm32f10x_sdio.o ├── stm32f10x_spi.crf ├── stm32f10x_spi.d ├── stm32f10x_spi.o ├── stm32f10x_tim.crf ├── stm32f10x_tim.d ├── stm32f10x_tim.o ├── stm32f10x_usart.crf ├── stm32f10x_usart.d ├── stm32f10x_usart.o ├── stm32f10x_wwdg.crf ├── stm32f10x_wwdg.d ├── stm32f10x_wwdg.o ├── stm32f1xx_hal.d ├── stm32f1xx_hal_adc.d ├── stm32f1xx_hal_adc_ex.d ├── stm32f1xx_hal_can.d ├── stm32f1xx_hal_cec.d ├── stm32f1xx_hal_cortex.d ├── stm32f1xx_hal_crc.d ├── stm32f1xx_hal_dac.d ├── stm32f1xx_hal_dac_ex.d ├── stm32f1xx_hal_dma.d ├── stm32f1xx_hal_eth.d ├── stm32f1xx_hal_flash.d ├── stm32f1xx_hal_flash_ex.d ├── stm32f1xx_hal_gpio.d ├── stm32f1xx_hal_gpio_ex.d ├── stm32f1xx_hal_hcd.d ├── stm32f1xx_hal_i2c.d ├── stm32f1xx_hal_i2s.d ├── stm32f1xx_hal_irda.d ├── stm32f1xx_hal_iwdg.d ├── stm32f1xx_hal_mmc.d ├── stm32f1xx_hal_msp_template.d ├── stm32f1xx_hal_nand.d ├── stm32f1xx_hal_nor.d ├── stm32f1xx_hal_pccard.d ├── stm32f1xx_hal_pcd.d ├── stm32f1xx_hal_pcd_ex.d ├── stm32f1xx_hal_pwr.d ├── stm32f1xx_hal_rcc.d ├── stm32f1xx_hal_rcc_ex.d ├── stm32f1xx_hal_rtc.d ├── stm32f1xx_hal_rtc_ex.d ├── stm32f1xx_hal_sd.d ├── stm32f1xx_hal_smartcard.d ├── stm32f1xx_hal_spi.d ├── stm32f1xx_hal_spi_ex.d ├── stm32f1xx_hal_sram.d ├── stm32f1xx_hal_tim.d ├── stm32f1xx_hal_tim_ex.d ├── stm32f1xx_hal_timebase_rtc_alarm_template.d ├── stm32f1xx_hal_timebase_tim_template.d ├── stm32f1xx_hal_uart.d ├── stm32f1xx_hal_usart.d ├── stm32f1xx_hal_wwdg.d ├── stm32f1xx_ll_adc.crf ├── stm32f1xx_ll_adc.d ├── stm32f1xx_ll_adc.o ├── stm32f1xx_ll_crc.crf ├── stm32f1xx_ll_crc.d ├── stm32f1xx_ll_crc.o ├── stm32f1xx_ll_dac.crf ├── stm32f1xx_ll_dac.d ├── stm32f1xx_ll_dac.o ├── stm32f1xx_ll_dma.crf ├── stm32f1xx_ll_dma.d ├── stm32f1xx_ll_dma.o ├── stm32f1xx_ll_exti.crf ├── stm32f1xx_ll_exti.d ├── stm32f1xx_ll_exti.o ├── stm32f1xx_ll_fsmc.d ├── stm32f1xx_ll_gpio.crf ├── stm32f1xx_ll_gpio.d ├── stm32f1xx_ll_gpio.o ├── stm32f1xx_ll_i2c.crf ├── stm32f1xx_ll_i2c.d ├── stm32f1xx_ll_i2c.o ├── stm32f1xx_ll_pwr.crf ├── stm32f1xx_ll_pwr.d ├── stm32f1xx_ll_pwr.o ├── stm32f1xx_ll_rcc.crf ├── stm32f1xx_ll_rcc.d ├── stm32f1xx_ll_rcc.o ├── stm32f1xx_ll_rtc.crf ├── stm32f1xx_ll_rtc.d ├── stm32f1xx_ll_rtc.o ├── stm32f1xx_ll_sdmmc.d ├── stm32f1xx_ll_spi.crf ├── stm32f1xx_ll_spi.d ├── stm32f1xx_ll_spi.o ├── stm32f1xx_ll_tim.crf ├── stm32f1xx_ll_tim.d ├── stm32f1xx_ll_tim.o ├── stm32f1xx_ll_usart.crf ├── stm32f1xx_ll_usart.d ├── stm32f1xx_ll_usart.o ├── stm32f1xx_ll_usb.d ├── stm32f1xx_ll_utils.d ├── sys.crf ├── sys.d ├── sys.o ├── system_stm32f10x.crf ├── system_stm32f10x.d ├── system_stm32f10x.o ├── timer.crf ├── timer.d ├── timer.o ├── usart.crf ├── usart.d └── usart.o ├── USER ├── Common.h ├── EdpKit.c ├── PWM.Uv2.bak ├── PWM.map ├── PWM.opt.bak ├── PWM.uvgui.小胖 ├── PWM.uvguix.小胖 ├── PWM.uvopt ├── PWM.uvoptx ├── PWM_Target 1.dep ├── USART.Opt ├── adc.c ├── adc.h ├── delay.c ├── delay.h ├── edpkit.h ├── esp8266.c ├── esp8266.h ├── key.c ├── key.h ├── led.c ├── led.h ├── main.c ├── malloc.c ├── malloc.h ├── onenet.c ├── onenet.h ├── sample.c ├── startup_stm32f10x_hd.lst ├── stm32f10x.h ├── stm32f10x_conf.h ├── stm32f10x_it.c ├── stm32f10x_it.h ├── stm32f1xx_hal_conf.h ├── sys.c ├── sys.h ├── system_stm32f10x.c ├── system_stm32f10x.h ├── timer.c ├── timer.h ├── usart.c └── usart.h ├── smartlamp.uvguix.wwwQw ├── smartlamp.uvguix.小胖 ├── smartlamp.uvoptx └── smartlamp.uvprojx /README.md: -------------------------------------------------------------------------------- 1 | # Light_Control 2 | 基于STM32F103C8T6、ESP8266WiFI、Onenet云端、安卓APP的智能灯光控制系统 3 | 4 | --- 5 | 6 | ### 目录解说: 7 | ``` 8 | androidContorl 是APP工程。 9 | stm32Project 是32单片机的工程,包括初始化ESP8266连接和接收模式。 10 | ``` 11 | ### 硬件设备 12 | 1、单片机采用STM32F103C8T6型号控制器 13 | ![STM32F103C8T6](./photo/stm32.png) 14 | 15 | 2、串口调试设备 16 | ![串口](./photo/cp2102串口.png) 17 | 18 | 3、esp8266 WIFI模块 19 | ![esp8266](./photo/esp8266.png) 20 | 21 | 4、下载模块 22 | ![S-Tlink](./photo/s-tlink.png) 23 | 24 | 5、LED灯驱动模块 25 | ![led_control](./photo/led_control.png) 26 | 27 | 6、LED灯电源模块 28 | ![led_power](./photo/led_power.png) 29 | 30 | ### APP 31 | APP采用Android Studio 进行开发
32 | 连接需要输入ESP8266的IP地址和端口号(ESP8266的AT指令可配置,详见工程代码) 33 | ![app](./photo/app界面.png) 34 | 35 | ### OneNET云端 36 | 云端采用OneNET开放平台,采用EDP方式与ESP8266进行通信
37 | 这种模式,需要ESP8266进行联网操作,可以连接wifi热点(工程代码可配置wifi热点信息) 38 | ![onenet](./photo/云端数据.png) 39 | 40 | --- 41 | 42 | ## 项目总结 43 | 系统目前实现功能: 44 | ``` 45 | 1、单片机按键切换模式:按键控制灯光、根据光照强度自动控制灯光、灯光数据上传云平台、安卓APP控制灯光。 46 | 2、每个模式之间相互独立。 47 | ``` 48 | 49 | 说明: 50 | ``` 51 | 使用本系统,在进入灯光数据上传云平台模式下,需要给ESP8266设置热点进行联网(此时ESP8266相当于客户端),热点的相关信息可在程序代码中配置;在安卓APP控制模式下,需要让APP所在的设备接上ESP8266的热点(此时ESP8266相当于服务器),再打开APP进行IP地址的直接相连进行通信。 52 | ``` -------------------------------------------------------------------------------- /androidControl/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | -------------------------------------------------------------------------------- /androidControl/.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | xmlns:android 14 | 15 | ^$ 16 | 17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 | xmlns:.* 25 | 26 | ^$ 27 | 28 | 29 | BY_NAME 30 | 31 |
32 |
33 | 34 | 35 | 36 | .*:id 37 | 38 | http://schemas.android.com/apk/res/android 39 | 40 | 41 | 42 |
43 |
44 | 45 | 46 | 47 | .*:name 48 | 49 | http://schemas.android.com/apk/res/android 50 | 51 | 52 | 53 |
54 |
55 | 56 | 57 | 58 | name 59 | 60 | ^$ 61 | 62 | 63 | 64 |
65 |
66 | 67 | 68 | 69 | style 70 | 71 | ^$ 72 | 73 | 74 | 75 |
76 |
77 | 78 | 79 | 80 | .* 81 | 82 | ^$ 83 | 84 | 85 | BY_NAME 86 | 87 |
88 |
89 | 90 | 91 | 92 | .* 93 | 94 | http://schemas.android.com/apk/res/android 95 | 96 | 97 | ANDROID_ATTRIBUTE_ORDER 98 | 99 |
100 |
101 | 102 | 103 | 104 | .* 105 | 106 | .* 107 | 108 | 109 | BY_NAME 110 | 111 |
112 |
113 |
114 |
115 |
116 |
-------------------------------------------------------------------------------- /androidControl/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 19 | 20 | -------------------------------------------------------------------------------- /androidControl/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /androidControl/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /androidControl/app/.idea/.name: -------------------------------------------------------------------------------- 1 | LED -------------------------------------------------------------------------------- /androidControl/app/.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qwekelly/Light_Control/69a82c56ac508499b264cf8f7ec3d3589e32ad50/androidControl/app/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /androidControl/app/.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | xmlns:android 14 | 15 | ^$ 16 | 17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 | xmlns:.* 25 | 26 | ^$ 27 | 28 | 29 | BY_NAME 30 | 31 |
32 |
33 | 34 | 35 | 36 | .*:id 37 | 38 | http://schemas.android.com/apk/res/android 39 | 40 | 41 | 42 |
43 |
44 | 45 | 46 | 47 | .*:name 48 | 49 | http://schemas.android.com/apk/res/android 50 | 51 | 52 | 53 |
54 |
55 | 56 | 57 | 58 | name 59 | 60 | ^$ 61 | 62 | 63 | 64 |
65 |
66 | 67 | 68 | 69 | style 70 | 71 | ^$ 72 | 73 | 74 | 75 |
76 |
77 | 78 | 79 | 80 | .* 81 | 82 | ^$ 83 | 84 | 85 | BY_NAME 86 | 87 |
88 |
89 | 90 | 91 | 92 | .* 93 | 94 | http://schemas.android.com/apk/res/android 95 | 96 | 97 | ANDROID_ATTRIBUTE_ORDER 98 | 99 |
100 |
101 | 102 | 103 | 104 | .* 105 | 106 | .* 107 | 108 | 109 | BY_NAME 110 | 111 |
112 |
113 |
114 |
115 |
116 |
-------------------------------------------------------------------------------- /androidControl/app/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 19 | 20 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_activity_activity_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_annotation_annotation_1_1_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_arch_core_core_common_2_1_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_collection_collection_1_1_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_core_core_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_fragment_fragment_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_1_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_test_core_1_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_test_ext_junit_1_1_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_test_monitor_1_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_test_runner_1_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__junit_junit_4_12_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /androidControl/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /androidControl/app/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /androidControl/app/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /androidControl/app/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /androidControl/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 29 5 | buildToolsVersion "29.0.3" 6 | 7 | defaultConfig { 8 | applicationId "com.example.led" 9 | minSdkVersion 16 10 | targetSdkVersion 29 11 | versionCode 1 12 | versionName "1.0" 13 | 14 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 15 | } 16 | 17 | buildTypes { 18 | release { 19 | minifyEnabled false 20 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | 24 | } 25 | 26 | dependencies { 27 | implementation fileTree(dir: 'libs', include: ['*.jar']) 28 | 29 | implementation 'androidx.appcompat:appcompat:1.1.0' 30 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 31 | testImplementation 'junit:junit:4.12' 32 | androidTestImplementation 'androidx.test.ext:junit:1.1.1' 33 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' 34 | } 35 | -------------------------------------------------------------------------------- /androidControl/app/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qwekelly/Light_Control/69a82c56ac508499b264cf8f7ec3d3589e32ad50/androidControl/app/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /androidControl/app/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri May 29 09:44:23 CST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip 7 | -------------------------------------------------------------------------------- /androidControl/app/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /androidControl/app/local.properties: -------------------------------------------------------------------------------- 1 | ## This file must *NOT* be checked into Version Control Systems, 2 | # as it contains information specific to your local configuration. 3 | # 4 | # Location of the SDK. This is only used by Gradle. 5 | # For customization when using a Version Control System, please read the 6 | # header note. 7 | #Fri May 29 09:43:57 CST 2020 8 | sdk.dir=C\:\\Users\\asus\\AppData\\Local\\Android\\Sdk 9 | -------------------------------------------------------------------------------- /androidControl/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /androidControl/app/src/androidTest/java/com/example/led/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.example.led; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | 25 | assertEquals("com.example.led", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /androidControl/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /androidControl/app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /androidControl/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 28 | 29 | 45 | 46 |