Created
June 1, 2025 04:03
-
-
Save jouellnyc/a05fca719dfa10e26a02589a2f83ca5b to your computer and use it in GitHub Desktop.
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
###############################################3 | |
# Get MAC Address using Micropython | |
# Where network_setup.sta_if is the lan object | |
# See https://stackoverflow.com/questions/71902740/how-to-retrieve-and-format-wifi-mac-address-in-micropython-on-esp32 | |
###############################################3 | |
import ubinascii | |
import network_setup | |
print(ubinascii.hexlify(network_setup.sta_if.config('mac'),':').decode().upper()) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment