01-ESP8266的STA模式学习

从今天开始记录自己学习ESP8266的过程

主要是借助Arduino平台,使用VScode环境

主要的学习思路还是围绕ESP8266的特点功能进行

01-ESP8266的STA模式学习:

Station(简称STA)模式

​ ESP8266处于STA模式简介状态图如下所示,主要的作用是作为一个(STA)站点去连接一个(AP)热点

img

相关头文件:#include <ESP8266WiFiSTA.h> 里面对于STA库的描述可以拆分为四个部分:

1.建立连接

 		wl_status_t begin(const char* ssid, const char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
        wl_status_t begin(char* ssid, char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
        wl_status_t begin(const String& ssid, const String& passphrase = emptyString, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
        wl_status_t begin();

        //The argument order for ESP is not the same as for Arduino. However, there is compatibility code under the hood
        //to detect Arduino arg order, and handle it correctly. Be aware that the Arduino default value handling doesn't
        //work here (see Arduino docs for gway/subnet defaults). In other words: at least 3 args must always be given.
        
  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值