Created
July 18, 2019 21:54
-
-
Save unforgiven512/d0593e938293220f8aad3e72fdb8d53c to your computer and use it in GitHub Desktop.
new main.py file on MicroPython ESP8266 board #7
This file contains hidden or 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
import network | |
import utime | |
import ntptime | |
import onewire | |
import ds18x20 | |
import socket | |
import os | |
import sys | |
import esp | |
import machine | |
# create some global objects | |
#rtc = machine.RTC() | |
def main(): | |
print('\n\n\n\n\n') | |
utime.sleep_ms(2500) | |
print('+------------------------------------------------------------------------------+') | |
utime.sleep_ms(25) | |
print('| Welcome to MicroPython on ESP8266 |') | |
utime.sleep_ms(25) | |
print('| ================================= |') | |
utime.sleep_ms(25) | |
print('| This is a basic installation of MicroPython on the ESP8266 platform. |') | |
utime.sleep_ms(25) | |
print('| |') | |
utime.sleep_ms(25) | |
print('| Basic facilities have been initialized, and the system is ready for usage in |') | |
utime.sleep_ms(25) | |
print('| simple applications. Network connectivity has been configured, with the WLAN |') | |
utime.sleep_ms(25) | |
print('| AP mode having been disabled, and the WLAN client (STA mode) having been set |') | |
utime.sleep_ms(25) | |
print('| to connect to the network PirateNet with the IP configuration acquired via |') | |
utime.sleep_ms(25) | |
print('| DHCP at the time of connection. The system time is to be set via NTP server. |') | |
utime.sleep_ms(25) | |
print('| |') | |
utime.sleep_ms(25) | |
print('| Enjoy, and please use responsibly! |') | |
utime.sleep_ms(25) | |
print('| |') | |
utime.sleep_ms(25) | |
print('| -- Courtesy of Gerad Munsch <[email protected]> |') | |
utime.sleep_ms(25) | |
print('+------------------------------------------------------------------------------+') | |
utime.sleep_ms(25) | |
print('\n\n\n') | |
utime.sleep_ms(250) | |
# while True: | |
# pass | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment