-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtransmit.py
More file actions
27 lines (25 loc) · 835 Bytes
/
transmit.py
File metadata and controls
27 lines (25 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import GroveGPS
import gpsToCalc
import subprocess
import time
#Namo Buddha Resort : 27.58069 85.5904714
if __name__ == "__main__":
print "While Looping..."
while 1:
print "Currently getting GPS"
proc = subprocess.Popen(['sudo', 'python', 'GroveGPS_modified.py'], shell=False)
time.sleep(20)
pid = proc.pid #if proc id is required
proc.terminate()
print "Now converting to dist and dir"
proc = subprocess.Popen(['sudo', 'python', 'gpsToDistance.py'], shell=False)
time.sleep(2)
proc.terminate()
print "Now converting to speech"
proc = subprocess.Popen(['sudo', 'espeak', '-f', 'foo.txt', '-w', 'foo.wav'], shell=False)
time.sleep(2)
proc.terminate()
print "Now transmitting speech"
proc = subprocess.Popen(['sudo', './pi_fm_rds', '-audio', 'foo.wav'], shell=False)
time.sleep(10)
proc.terminate()