ESP32-mDNS usage notes
Purpose: Adoptiondomain name
to access it without going through the IP address
The routines use theexample\protocols\http_server\restful_server
Refer to the project directory for the steps to implement the
1. sdkconfig configuration
Configure ssid and password
CONFIG_EXAMPLE_WIFI_SSID="PDCN"
CONFIG_EXAMPLE_WIFI_PASSWORD="1234567890"
- 1
- 2
Enable GONFIG_EXAMPLE_WEBE_DEPLOY_SF
#
# Example Configuration
#
CONFIG_EXAMPLE_MDNS_HOST_NAME="esp-home"
# CONFIG_EXAMPLE_WEB_DEPLOY_SEMIHOST is not set
# CONFIG_EXAMPLE_WEB_DEPLOY_SD is not set
CONFIG_EXAMPLE_WEB_DEPLOY_SF=y
CONFIG_EXAMPLE_WEB_MOUNT_POINT="/www"
# end of Example Configuration
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
2. Installationnpm
existnodeofficial website/en/
Download, current download version version 14.15.1LTS
cd path_to_this_example/front/web-demo
npm install
npm run build
- 1
- 2
- 3
path_to_this_example is the project path.
Build completes generatingdist
file (paper)
3、Compile build & burn flash
Basic operations ..., omitted
4. Open the browser
Enter domain name
If you want to change the domain name todobot-home
e.g.
sdkconfig
modifications
CONFIG_EXAMPLE_MDNS_HOST_NAME="dobot-home"
- 1
front/src/
modifications
target: ':80',
- 1
5. Web effects
Web effects are available atfront/src
modifications
The routines page consists of three sections, which are listed in thefront/src/views
following the path
- Home
- Chart
- Light
6、vue
import Vue from 'vue'
import Vuetify from 'vuetify/lib'
import 'vuetify/src/stylus/'
(Vuetify, {
iconfont: 'md',
})
- 1
- 2
- 3
- 4
- 5
- 6
- 7
Here iconfont chooses md(material design)
/resources/icons/?style=baseline