related articles
[Completely open source] Xiaoanpai Eyes-weather station
[Completely open source] Xiaoanpai-DSL screen driver development board
Article Directory
I. Overview
In response to the needs of fans, the engineer wanted to add the functions of computer interaction + offline voice + smart home control to the weather station, and the engineer lost his hair for half a month, and finally it came out.
This desktop assistant project is developed using Xiaoanpai-DSL core board + 3.5-inch touch screen , and has realized weather + time viewing, offline voice and some voice prompts, computer software shortcuts, and MQTT remote control functions. And also added the design of the shell, compared with the previous weather station, it is quite beautiful now.
2. Instructions for use
1. Configure WiFi connection
On Home
the page, slide down to enter the WiFi configuration page, click 搜索
the button to start searching for available SSIDs nearby, and select 10 WiFis with the strongest signal by default. After selecting WiFi, you can enter the WiFi password. A click of 连接
a button triggers a WiFi connection.
2. Use the shortcut assistant
1) Connect to Bluetooth
When the computer is not connected to the desktop assistant , it will prompt to connect:
The computer uses Bluetooth to connect to the Bluetooth keyboard device named "AiPi-Dashboard" . After the connection is successful, the interface will become:
2) Quick access
The shortcut software of the desktop assistant has been solidified, and the icon of the software that needs to be displayed cannot be dynamically configured. It is worth mentioning that the principle of the shortcut is to simulate the keyboard to press the shortcut key to open the software on the computer. The shortcuts of these 6 shortcuts The key is:
software | hot key |
---|---|
Vscode | Ctrl+Alt+A |
Baidu Netdisk | Ctrl+Alt+B |
Google Chrome | Ctrl+Alt+C |
WindTrem | Ctrl+Alt+D |
Note Studio | Ctrl+Alt+E |
EasyEDA Professional Edition | Ctrl+Alt+F |
Any software on the computer can be set to use one of these 6 shortcut keys to realize quick opening. For example:
after completing this setting, you can open any software on the computer with the desktop assistant.
3. Connect to the MQTT server
The remote control method is realized through MQTT, and the desktop assistant will connect to the MQTT server as a client, and control the client that has subscribed to the message by sending a message to the server. In this project, the MQTT server used is the public server of "EMQX" (https://www.emqx.com/zh/mqtt/public-mqtt5-broker), of course, the server can be dynamically configured, in the SmartCtrl
control interface , you can configure the HOST of the server by configuring the client information:
The configuration of ClientID is not provided here , because the interface really does not want to make it too big. The default ClientID="AiPi-DSL_Dashboard" , of course you can also modify it in the code. In addition, the topic and content of sending messages can also be freely configured, just click the edit button:
Finally, you can click 挂灯
to send commands to the MQTT server.
4. Voice commands
Offline voice is realized by using VC-01 , which allows you to free your hands to do operations such as connecting to the server, controlling lights, and even opening computer software. Using VC-01 desktop assistant can have some simple voice prompts, such as 网络成功
, , 天气查询成功
etc.
3. Data acquisition
Anxinke official website docs: https://docs.ai-thinker.com/wifi
M6x-SDK programming guide: https://bouffalolab.github.io/bl_iot_sdk
AiPi-DSL_Dashboard package address: https://docs.ai- thinker.com/dsl
AiPi-DSL_Dashboard data package address (Github): https://github.com/Ai-Thinker-Open/AiPi-Open-Kits/tree/master/AiPi-DSL_Dashboard