2017年4月27日木曜日

MicroPython install ESP-12E (2)

とりあえず、boot.pyに固定IPの設定(?)を追加してみた。

C:\>ampy -p COM6 put boot.py   /boot.py

# This file is executed on every boot (including wake-boot from deepsleep)
#import esp
#esp.osdebug(None)
import gc
#import webrepl
#webrepl.start()
gc.collect()
# ここから....
import network
nic = network.WLAN(network.STA_IF)
nic.active(True)
nic.ifconfig(('192.168.xx.x2', '255.255.255.0', '192.168.xx.xx', '192.168.xx.xx'))
nic.connect('xxxxx', 'xxxx')



0 件のコメント: