Created
August 5, 2020 00:21
-
-
Save cra/e68fb303a7e6e6a4a231b8daf311f2b2 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python2 | |
from datetime import datetime as dt | |
import os | |
from dot3k import lcd | |
if __name__ == "__main__": | |
lcd.write(dt.now().strftime("%Y/%m/%d %H:%M")) | |
ip = os.popen("hostname -i") | |
ip = ip.readline().strip() | |
lcd.set_cursor_position(0, 1) | |
lcd.write(ip) | |
ssid = os.popen("iwconfig wlan0 | grep ESSID") | |
ssid = ssid.readline().strip() | |
ssid = ssid.split(":")[1].split()[0].strip('"') | |
lcd.set_cursor_position(0, 2) | |
lcd.write(ssid) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment