Created
February 5, 2018 18:33
-
-
Save halmartin/b5563b4c074ab92762dbbf6edf7a0693 to your computer and use it in GitHub Desktop.
MicroPython boot.py file, used on Wemos D1 mini temperature sensor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is executed on every boot (including wake-boot from deepsleep) | |
import gc | |
gc.collect() | |
# connect to WiFi | |
import network | |
sta_if = network.WLAN(network.STA_IF) | |
sta_if.active(True) | |
sta_if.connect("MySSID","P4ssw0rd!") | |
from time import sleep | |
while not sta_if.isconnected(): | |
sleep(1) | |
ap_if = network.WLAN(network.AP_IF) | |
ap_if.active(False) | |
from tempsens import TempSensReport | |
TempSensReport() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment