i keep forgetting how class declarations work in python
This commit is contained in:
parent
ad1e7cc95f
commit
b19a681565
|
@ -1,4 +1,5 @@
|
||||||
def __init__(self, hw):
|
class PrintHWInfo:
|
||||||
|
def __init__(self, hw):
|
||||||
#Basic script to print module family, variant, and IP address
|
#Basic script to print module family, variant, and IP address
|
||||||
from network import WLAN as wlan, STA_IF as staif
|
from network import WLAN as wlan, STA_IF as staif
|
||||||
from time import sleep_ms
|
from time import sleep_ms
|
||||||
|
|
2
main.py
2
main.py
|
@ -3,6 +3,6 @@ import uPyConfig
|
||||||
hw = uPyConfig.esp32(variant='wemos-lolin32')
|
hw = uPyConfig.esp32(variant='wemos-lolin32')
|
||||||
#print family, variant and IP address (using oled, if available on-board)
|
#print family, variant and IP address (using oled, if available on-board)
|
||||||
import init_sample
|
import init_sample
|
||||||
init_sample(hw)
|
init_sample.PrintHWInfo(hw)
|
||||||
|
|
||||||
# Main app
|
# Main app
|
||||||
|
|
Loading…
Reference in New Issue