1 Star 0 Fork 1

Joe/mqtt4bafa

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
boot.py 696 Bytes
一键复制 编辑 原始数据 按行查看 历史
Joe 提交于 2024-01-29 05:40 . update boot.py.
import gc
import os
import esp
import machine
import network
from machine import Pin
esp.osdebug(None)
gc.collect()
machine.freq(160000000)
wifi_ssid = "JOE"
wifi_key = "12345678"
SERVER = "bemfa.com"
CLIENT_ID = "260e3a3a6fexxxxxxx92802cd87310349d"
TOPIC = b"test006"
PORT = 9501
LED = Pin(2,Pin.OUT)
def do_connect(ssid,key):
import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
if not wlan.isconnected():
print('connecting to network...')
wlan.connect(ssid, key)
while not wlan.isconnected():
pass
print('network config:', wlan.ifconfig())
do_connect(wifi_ssid,wifi_key)
print('Connection successful')
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/li-da-diao/mqtt4bafa.git
[email protected]:li-da-diao/mqtt4bafa.git
li-da-diao
mqtt4bafa
mqtt4bafa
master

搜索帮助