Advertisement
j33p33

Untitled

Oct 19th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. # Demo program for the I2C 16x2 Display
  2. # Created by j33p33. because he needed to.
  3.  
  4. # Import necessary libraries for commuunication and display use
  5.  
  6. import lcddriver
  7. import time
  8. import subprocess
  9. from subprocess import Popen, PIPE
  10.  
  11. display = lcddriver.lcd()
  12.  
  13. proc = subprocess.Popen(['audtool','--current-song'], stdout=subprocess.PIPE)
  14. textlcd = proc.communicate()[0]
  15. print textlcd
  16.  
  17. print("output data-check lcd")
  18.  
  19. try:
  20. display.lcd_clear()
  21. display.lcd_display_string(textlcd, 1)
  22. time.sleep (30)
  23. print ("it went there")
  24. except:
  25. print ("some shit")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement