@@ -66,22 +66,12 @@ def hold():
6666# Invokes twitter script.
6767def interval ():
6868 return
69- GPIO .output (ledPin , GPIO .HIGH )
70- p = subprocess .Popen (["python3" , "twitter.py" , str (lastId )],
71- stdout = subprocess .PIPE )
72- GPIO .output (ledPin , GPIO .LOW )
73- return p .communicate ()[0 ] # Script pipes back lastId, returned to main
7469
7570
7671# Called once per day (6:30am by default).
7772# Invokes weather forecast and sudoku-gfx scripts.
7873def daily ():
7974 return
80- pass
81- GPIO .output (ledPin , GPIO .HIGH )
82- subprocess .call (["python3" , "forecast.py" ])
83- subprocess .call (["python3" , "sudoku-gfx.py" ])
84- GPIO .output (ledPin , GPIO .LOW )
8575
8676
8777# Initialization
@@ -103,24 +93,7 @@ def daily():
10393printer .print ("Hello!" )
10494printer .feed (3 )
10595
106- # Show IP address (if network is available)
107- #try:
108- # s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
109- # s.connect(('8.8.8.8', 0))
110- # printer.print('My IP address is ' + s.getsockname()[0])
111- # printer.feed(3)
112- #except:
113- # printer.boldOn()
114- # printer.println('Network is unreachable.')
115- # printer.boldOff()
116- # printer.print('Connect display and keyboard\n'
117- # 'for network troubleshooting.')
118- # printer.feed(3)
119- # exit(0)
120-
121- # Print greeting image
122- # printer.printImage(Image.open('gfx/hello.png'), True)
123- # printer.feed(3)
96+
12497GPIO .output (ledPin , GPIO .LOW )
12598
12699# Poll initial button state and time
0 commit comments