4WKDDT

# Sixth Lichuang Electric Competition#Offline language + weather station

 
Overview
  • Introduction:

        1. Using Qiyingtailun CI-C22GS02S module and stm32f103 dual control;

        2. The voice module and stm32 pins are all lead out to facilitate development;

        3.IP5306 power management;

        4. You can develop stm32 and use firmware for the voice module; you can also develop the voice module and expand stm32.

  • Precautions:

       1. Every time the voice module wakes up and issues a voice command, the serial port 0 of the module prints relevant information. The original PCB mistakenly put the module serial port 1 and the stm32 serial port together. Since the module serial port has pin headers, there is no impact. Just connect the Dupont wire;

       2. It is recommended to use a lithium battery with a larger capacity. My 400mA battery ran out of power soon;

       3. The switch connected to IP5306 can be used to turn on and off the machine;

       4. The three blue terminals are basically useless. The terminals can be replaced with contacts or holes;

       5. The microphone terminal block can be omitted, and the microphone has already been soldered on the board.

  • renew:

       Added weather knowing to obtain year, month, day, local weather, local temperature and other data.

       Local weather is replaced with weather pictures.

       cmd_id refers to the ID number corresponding to the voice control command, which is used to operate the microcontroller.

The following are some simple API interfaces

  1. Get live weather
    GET https://api.seniverse.com/v3/weather/now.json?key=your_api_key&location=jian&language=en&unit=c
  2. Get the life index
    GET https://api.seniverse.com/v3/life/suggestion.json?key=your_api_key&location=jian&language=zh-Hans
  3. Get the weather for the next three days
    GET https://api.seniverse.com/v3/weather/daily.json?key=your_api_key&location=jian&language=zh-Hans&unit=c&start=0&days=4

 

*After registering for a Zhixin Weather account, you can apply for the free version and the trial version. You can obtain more data. There are examples of various KPI interfaces. You can choose according to your personal needs.

 Just fill in your_api_key with the private key in your product key.

Basic software processes

    Regarding the voice module software, the official firmware library has not been modified, and it mainly focuses on the processing of voice module and wireless module data.

    The main control STM32F103C8T6 has 3 serial ports. Serial port 1+DMA is used to receive data from the wireless module (the wireless module sends more data), and serial port 3 is used to receive information from the voice module in interrupt mode. Extract the required information from these data, currently used include weather, date, temperature, and command ID of the voice module. The TCP connection sent by the wireless module to Zhixin Weather is placed in the timer TIM1, because the free version has a connection limit of one minute... The setting here is to update the weather data every 2 minutes. Of course, it can be longer. On the other hand, the power consumption of the wireless module can be reduced by reducing the number of connections.

    One thing is that the time in the JSON data obtained by Zhixin Weather is not real-time, but the weather update time (updated approximately every 20 minutes). Therefore, we consider adding a cloud platform to pull down the time data to make this little thing more accurate. Improve some.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-24 17:23:38
  • I will comment on solar photovoltaic power generation solutions
  • WinCE5 C# serialport control receiving data problem!
  • 3MAB5000/AB5000S/AB5000R absorbing materials
  • How to crack Protel 99 SE in Windows 7
  • Could you help me analyze the reason? Thanks!
  • Usage of the FSRAMPERCENT parameter in CONFIG.BIB

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号