Skip to content

Instantly share code, notes, and snippets.

@cra
Created August 5, 2020 00:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cra/e68fb303a7e6e6a4a231b8daf311f2b2 to your computer and use it in GitHub Desktop.
Save cra/e68fb303a7e6e6a4a231b8daf311f2b2 to your computer and use it in GitHub Desktop.
#!/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