没有合适的资源?快使用搜索试试~ 我知道了~
首页ESP8266与ESP32:物联网应用的低成本Wi-Fi模块
ESP8266与ESP32:物联网应用的低成本Wi-Fi模块
需积分: 10 2 下载量 14 浏览量
更新于2024-07-21
收藏 6.4MB PDF 举报
"ESP8266 ESP32 模块在物联网应用中的低价Wi-Fi解决方案"
ESP8266是一种低成本的Wi-Fi模块,专为物联网(IoT)应用设计。它以其紧凑的尺寸、强大的功能和相对低廉的价格,在众多物联网项目中广泛使用。ESP8266芯片内置了802.11 b/g/n Wi-Fi标准,能够实现设备与互联网的无线连接。模块的成熟度不断提高,使得它在开发板、 shield以及各种DIY项目中成为首选。
规格方面,ESP8266提供了多种不同的版本和形式,如ESP-12、ESP-13等,它们具有不同的封装和引脚配置,以适应不同用户的需求。例如,Adafruit HUZZAH和NodeMCU devKit是流行的开发板,它们为开发者提供了易于使用的平台,包括连接到GPIO引脚、模拟输入和输出等功能。另外,像SparkFun WiFi Shield - ESP8266这样的 shields,则方便用户将Wi-Fi功能添加到现有的Arduino项目中。
与ESP8266模块的通信通常通过AT命令进行,这是一种简单易用的文本协议,允许用户控制模块的网络设置和操作。这些命令包括连接到Wi-Fi网络、发送数据等基本功能。安装最新的AT命令处理器是确保模块性能的关键步骤,这可能涉及固件更新和配置。
建立电路时,需要USB转UART转换器来连接ESP8266与电脑,以便编程和调试。面包板、电源、多米表、逻辑探针和逻辑分析器是常见的辅助工具,用于构建和测试硬件。物理构造时,推荐的编程设置包括正确配置设备的闪存,以便加载程序。
ESP8266的SDK(软件开发套件)包含了必要的库和工具,用于编译和运行代码。这些工具包括但不限于ar、gcc、gen_appbin.py、make、nodemcu-flasher、nm、objcopy、objdump和xxd,它们用于链接、编译和调试程序。此外,可以使用FOTA(空中升级)功能远程更新固件,增强了设备的可维护性。
调试方面,可以通过UART接口记录日志,或者运行简单的示例程序如“Blinky”来检查模块的基本功能。通过UART接口,还能将模块的状态和内部数据进行转储,帮助开发者深入理解其工作原理。
ESP8266因其性价比高、功能强大且易于上手,成为IoT开发者的理想选择。无论是在家庭自动化、远程监控还是智能硬件项目中,都能看到ESP8266的身影。而随着技术的发展,ESP32作为ESP8266的升级版,更是提供了更多的GPIO引脚、蓝牙支持以及更强的处理能力,进一步扩展了物联网应用的可能性。
WiFi SoftAP......................................................................................................................... 332
wifi_softap_dhcps_start..................................................................................................332
wifi_softap_dhcps_status................................................................................................333
wifi_softap_dhcps_stop...................................................................................................333
wifi_softap_free_station_info..........................................................................................333
wifi_softap_get_config....................................................................................................334
wifi_softap_get_config_default........................................................................................334
wifi_softap_get_dhcps_lease..........................................................................................335
wifi_softap_get_dhcps_lease_time.................................................................................335
wifi_softap_get_station_info............................................................................................335
wifi_softap_get_station_num..........................................................................................335
wifi_softap_reset_dhcps_lease_time..............................................................................335
wifi_softap_set_config.....................................................................................................336
wifi_softap_set_config_current.......................................................................................336
wifi_softap_set_dhcps_lease_time.................................................................................337
wifi_softap_dhcps_offer_option.......................................................................................337
WiFi WPS............................................................................................................................ 337
wifi_wps_enable.............................................................................................................337
wifi_wps_disable.............................................................................................................338
wifi_wps_start................................................................................................................. 338
wifi_set_wps_cb.............................................................................................................. 338
Upgrade APIs...................................................................................................................... 338
system_upgrade_flag_check..........................................................................................338
system_upgrade_flag_set...............................................................................................339
system_upgrade_reboot.................................................................................................339
system_upgrade_start....................................................................................................339
system_upgrade_userbin_check....................................................................................339
wifi_promiscuous_enable................................................................................................339
wifi_promiscuous_set_mac.............................................................................................340
wifi_promiscuous_rx_cb..................................................................................................340
wifi_get_channel.............................................................................................................340
wifi_set_channel............................................................................................................. 340
Smart config APIs................................................................................................................340
smartconfig_start............................................................................................................ 340
smartconfig_stop............................................................................................................340
SNTP API............................................................................................................................ 340
sntp_setserver................................................................................................................ 340
sntp_getserver................................................................................................................341
sntp_setservername.......................................................................................................341
sntp_getservername.......................................................................................................341
sntp_init..........................................................................................................................341
sntp_stop........................................................................................................................ 342
sntp_get_current_timestamp..........................................................................................342
sntp_get_real_time......................................................................................................... 342
Page 16
sntp_set_timezone.......................................................................................................... 342
sntp_get_timezone.........................................................................................................343
Generic TCP/UDP APIs.......................................................................................................343
espconn_delete.............................................................................................................. 343
espconn_dns_setserver..................................................................................................344
espconn_gethostbyname................................................................................................344
espconn_port..................................................................................................................345
espconn_regist_sentcb...................................................................................................345
espconn_regist_recvcb...................................................................................................345
espconn_send................................................................................................................ 346
espconn_sendto............................................................................................................. 346
ipaddr_addr....................................................................................................................346
IP4_ADDR...................................................................................................................... 347
IP2STR........................................................................................................................... 347
TCP APIs............................................................................................................................. 347
espconn_abort................................................................................................................347
espconn_accept.............................................................................................................. 348
espconn_get_connection_info........................................................................................348
espconn_connect............................................................................................................ 349
espconn_disconnect.......................................................................................................349
espconn_regist_connectcb.............................................................................................350
espconn_regist_disconcb...............................................................................................350
espconn_regist_reconcb.................................................................................................351
espconn_regist_write_finish............................................................................................352
espconn_set_opt............................................................................................................ 352
espconn_clear_opt......................................................................................................... 353
espconn_regist_time....................................................................................................... 353
espconn_set_keepalive..................................................................................................354
espconn_get_keepalive..................................................................................................354
espconn_secure_accept.................................................................................................354
espconn_secure_ca_disable..........................................................................................354
espconn_secure_ca_enable...........................................................................................354
espconn_secure_set_size..............................................................................................354
espconn_secure_get_size..............................................................................................354
espconn_secure_delete..................................................................................................354
espconn_secure_connect...............................................................................................355
espconn_secure_send....................................................................................................355
espconn_secure_disconnect..........................................................................................355
espconn_tcp_get_max_con............................................................................................355
espconn_tcp_set_max_con............................................................................................355
espconn_tcp_get_max_con_allow..................................................................................355
espconn_tcp_set_max_con_allow..................................................................................356
espconn_recv_hold......................................................................................................... 356
espconn_recv_unhold.....................................................................................................356
Page 17
UDP APIs............................................................................................................................356
espconn_create.............................................................................................................. 356
espconn_igmp_join.........................................................................................................357
espconn_igmp_leave......................................................................................................357
ping APIs............................................................................................................................. 357
ping_start........................................................................................................................ 357
ping_regist_recv.............................................................................................................357
ping_regist_sent.............................................................................................................357
mDNS APIs.........................................................................................................................358
espconn_mdns_init.........................................................................................................358
espconn_mdns_close.....................................................................................................358
espconn_mdns_server_register......................................................................................358
espconn_mdns_server_unregister..................................................................................358
espconn_mdns_get_servername....................................................................................359
espconn_mdns_set_servername....................................................................................359
espconn_mdns_set_hostname.......................................................................................359
espconn_mdns_get_hostname.......................................................................................359
espconn_mdns_disable..................................................................................................359
espconn_mdns_enable...................................................................................................359
GPIO................................................................................................................................... 359
PIN_PULLUP_DIS..........................................................................................................361
PIN_PULLUP_EN...........................................................................................................362
PIN_FUNC_SELECT......................................................................................................362
GPIO_ID_PIN.................................................................................................................362
GPIO_OUTPUT_SET..................................................................................................... 362
GPIO_DIS_OUTPUT...................................................................................................... 363
GPIO_INPUT_GET.........................................................................................................363
gpio_output_set.............................................................................................................. 363
gpio_input_get................................................................................................................ 364
gpio_intr_handler_register..............................................................................................364
gpio_pin_intr_state_set...................................................................................................364
gpio_intr_pending........................................................................................................... 365
gpio_intr_ack..................................................................................................................365
gpio_pin_wakeup_enable...............................................................................................365
gpio_pin_wakeup_disable...............................................................................................366
UART APIs.......................................................................................................................... 366
UART_CheckOutputFinished..........................................................................................366
UART_ClearIntrStatus....................................................................................................366
UART_ResetFifo.............................................................................................................366
UART_SetBaudrate........................................................................................................366
UART_SetFlowCtrl.......................................................................................................... 366
UART_SetIntrEna...........................................................................................................366
UART_SetLineInverse....................................................................................................366
UART_SetParity.............................................................................................................366
Page 18
UART_SetPrintPort.........................................................................................................367
UART_SetStopBits......................................................................................................... 367
UART_SetWordLength...................................................................................................367
UART_WaitTxFifoEmpty.................................................................................................367
uart_init........................................................................................................................... 367
uart0_tx_buffer................................................................................................................ 368
uart0_sendStr................................................................................................................. 368
uart0_rx_intr_handler...................................................................................................... 368
I2C Master APIs..................................................................................................................369
i2c_master_checkAck.....................................................................................................369
i2c_master_getAck......................................................................................................... 369
i2c_master_gpio_init.......................................................................................................369
i2c_master_init................................................................................................................369
i2c_master_readByte......................................................................................................369
i2c_master_send_ack.....................................................................................................369
i2c_master_send_nack...................................................................................................370
i2c_master_setAck.........................................................................................................370
i2c_master_start............................................................................................................. 370
i2c_master_stop.............................................................................................................370
i2c_master_writeByte......................................................................................................370
SPI APIs.............................................................................................................................. 370
cache_flush....................................................................................................................370
spi_lcd_9bit_write........................................................................................................... 370
spi_mast_byte_write.......................................................................................................370
spi_byte_write_espslave.................................................................................................370
spi_slave_init.................................................................................................................. 371
spi_slave_isr_handler.....................................................................................................371
hspi_master_readwrite_repeat.......................................................................................371
spi_test_init.....................................................................................................................371
PWM APIs........................................................................................................................... 371
pwm_init......................................................................................................................... 371
pwm_start....................................................................................................................... 372
pwm_set_duty................................................................................................................. 372
pwm_get_duty................................................................................................................372
pwm_set_period.............................................................................................................372
pwm_get_period............................................................................................................. 373
get_pwm_version............................................................................................................ 373
set_pwm_debug_en(uint8 print_en)................................................................................373
Bit twiddling.................................................................................................................... 373
ESP Now............................................................................................................................. 374
esp_now_add_peer........................................................................................................374
esp_now_deinit...............................................................................................................374
esp_now_del_peer......................................................................................................... 374
esp_now_get_peer_key..................................................................................................374
Page 19
esp_now_get_peer_role.................................................................................................374
esp_now_get_self_role...................................................................................................374
esp_now_init...................................................................................................................374
esp_now_register_recv_cb.............................................................................................374
esp_now_register_send_cb............................................................................................374
esp_now_send................................................................................................................ 374
esp_now_set_kok...........................................................................................................374
esp_now_set_peer_role..................................................................................................374
esp_now_set_peer_key..................................................................................................374
esp_now_set_self_role...................................................................................................374
esp_now_unregister_recv_cb.........................................................................................374
esp_now_unregister_send_cb........................................................................................374
SPIFFS................................................................................................................................ 374
esp_spiffs_deinit.............................................................................................................375
esp_spiffs_init................................................................................................................. 375
SPIFFS_check................................................................................................................376
SPIFFS_clearerr............................................................................................................. 376
SPIFFS_close.................................................................................................................376
SPIFFS_closedir.............................................................................................................377
SPIFFS_creat.................................................................................................................377
SPIFFS_erase_deleted_block........................................................................................377
SPIFFS_errno.................................................................................................................377
SPIFFS_fflush.................................................................................................................377
SPIFFS_format............................................................................................................... 377
SPIFFS_fremove............................................................................................................378
SPIFFS_fstat..................................................................................................................378
SPIFFS_gc.....................................................................................................................378
SPIFFS_gc_quick...........................................................................................................378
SPIFFS_info...................................................................................................................378
SPIFFS_lseek.................................................................................................................378
SPIFFS_mount............................................................................................................... 379
SPIFFS_mounted........................................................................................................... 380
SPIFFS_open................................................................................................................. 380
SPIFFS_open_by_dirent.................................................................................................381
SPIFFS_opendir............................................................................................................. 381
SPIFFS_read.................................................................................................................. 382
SPIFFS_readdir.............................................................................................................. 382
SPIFFS_remove............................................................................................................. 382
SPIFFS_rename............................................................................................................. 382
SPIFFS_stat...................................................................................................................383
SPIFFS_unmount........................................................................................................... 383
SPIFFS_write..................................................................................................................383
Lib-C.................................................................................................................................... 383
atoi.................................................................................................................................. 383
Page 20
剩余409页未读,继续阅读
2021-10-02 上传
2020-01-13 上传
2021-10-03 上传
2022-07-15 上传
2023-12-10 上传
2022-01-11 上传
2019-10-07 上传
2021-10-01 上传
2021-09-29 上传
ynguo
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Android圆角进度条控件的设计与应用
- mui框架实现带侧边栏的响应式布局
- Android仿知乎横线直线进度条实现教程
- SSM选课系统实现:Spring+SpringMVC+MyBatis源码剖析
- 使用JavaScript开发的流星待办事项应用
- Google Code Jam 2015竞赛回顾与Java编程实践
- Angular 2与NW.js集成:通过Webpack和Gulp构建环境详解
- OneDayTripPlanner:数字化城市旅游活动规划助手
- TinySTM 轻量级原子操作库的详细介绍与安装指南
- 模拟PHP序列化:JavaScript实现序列化与反序列化技术
- ***进销存系统全面功能介绍与开发指南
- 掌握Clojure命名空间的正确重新加载技巧
- 免费获取VMD模态分解Matlab源代码与案例数据
- BuglyEasyToUnity最新更新优化:简化Unity开发者接入流程
- Android学生俱乐部项目任务2解析与实践
- 掌握Elixir语言构建高效分布式网络爬虫
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功