#Imports import RPi.GPIO as GPIO import time from flask import Flask, request import pygame from espeak import espeak from twilio.rest import TwilioRestClient from twilio import twiml import thread #Twilio account_sid = "ACde81dd58f051d92e6b864b5e9df7c3bd" auth_token = "7916c6a83a913818b622ad04638fd714" client = TwilioRestClient(account_sid, auth_token) messages = client.messages.list() #GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(17, GPIO.IN) GPIO.setup(27, GPIO.IN) #Twilio Variables txt1 = "" txt2 = "" txt3 = "" txt4 = "" txt5 = "" txt6 = "" txt7 = "" txt8 = "" txt9 = "" txt10 = "" boo = False booA = False response = "" txt1a = "" txt2a = "" txt3a = "" txt4a = "" txt5a = "" txt6a = "" txt7a = "" txt8a = "" txt9a = "" txt10a = "" boo2 = False boo2A = False txt1b = "" txt2b = "" txt3b = "" txt4b = "" txt5b = "" txt6b = "" txt7b = "" txt8b = "" txt9b = "" txt10b = "" boo3 = False boo3B = False #Variables letter = "" letterB = "" sent = "" n = 0 times = 0 timep = 0 word = "" libCount = 0 smsin = "" number = "" Mitchell = "+12053528126" Will = "+12059070365" Bond = "+12055165515" modeSwitch = 1 modeCnt = 1 listen = True dotMove = 0 sentTo = "" hour = 0 minute = 0 timeC = "" clockS = "" print(time.ctime()) #Pygame clock = pygame.time.Clock() pygame.init() gameDisplay = pygame.display.set_mode((1920,1080)) pygame.display.set_caption("Augmentative Messaging System Communication Device") white = (255,255,255) black = (0,0,0) blue = (0,0,255) red = (255,0,0) gameDisplay.fill(white) pygame.display.update() txtFont = pygame.font.Font('Lora-Italic.ttf', 25) font15 = pygame.font.Font(None, 15) font25 = pygame.font.Font(None, 25) font75 = pygame.font.Font(None, 75) font50 = pygame.font.Font(None, 50) mcImg = pygame.image.load('mc1.png') dot = pygame.image.load('dot.jpg') dash = pygame.image.load('dash.jpg') star1 = pygame.image.load('star.jpg') willPic = pygame.image.load('Will.jpg') mitchPic = pygame.image.load('Mitchell.jpg') bondPic = pygame.image.load('Bond.jpg') redDot1 = pygame.image.load('red.jpg') tts = pygame.image.load('text.jpg') bk = pygame.image.load('background.jpg') dd = pygame.image.load('dd.png') wd = pygame.image.load('word.png') cd = pygame.image.load('cd.png') ttss = pygame.image.load('tts s.png') ttsu = pygame.image.load('tts u.png') #Twilio Methods app = Flask(__name__) @app.route('/sms', methods=['POST']) def sms(): global number global booA global response global smsin, Mitchell, Will number = request.form['From'] body = request.form['Body'] smsin += "+" + body resp = twiml.Response() resp.message("Received") response = str(resp) if(number == Mitchell): #booA = True Mitchin() print(number) if(number == Will): Willin() #boo2A = True print(number) if(number == Bond): Bondin() #boo2A = True print(number) return response def incomingSms(): if(__name__ == '__main__'): app.run() #GUI Methods #def animation(): global times, timep if(GPIO.input(17) == 0): #time.sleep(.1) pygame.draw.rect(gameDisplay, white, [290,100,150, 20]) if(GPIO.input(27) == 0): #time.sleep(.1) pygame.draw.rect(gameDisplay, white, [290,100,150, 20]) if(times > 10000): pygame.draw.rect(gameDisplay, white, [290,100,20, 20]) pygame.draw.rect(gameDisplay, red, [290,100,20, 20]) if(times > 40000): pygame.draw.rect(gameDisplay, white, [330,100,20, 20]) pygame.draw.rect(gameDisplay, red, [330,100,20, 20]) if(times > 70000): pygame.draw.rect(gameDisplay, white, [370,100,20, 20]) pygame.draw.rect(gameDisplay, red, [370,100,20, 20]) if(times > 130000): pygame.draw.rect(gameDisplay, white, [410,100,20, 20]) pygame.draw.rect(gameDisplay, red, [410,100,20, 20]) if(timep > 10000): pygame.draw.rect(gameDisplay, white, [290,100,20, 20]) pygame.draw.rect(gameDisplay, blue, [290,100,20, 20]) if(timep > 40000): pygame.draw.rect(gameDisplay, white, [330,100,20, 20]) pygame.draw.rect(gameDisplay, blue, [330,100,20, 20]) if(timep > 70000): pygame.draw.rect(gameDisplay, white, [370,100,20, 20]) pygame.draw.rect(gameDisplay, blue, [370,100,20, 20]) if(timep > 100000): pygame.draw.rect(gameDisplay, white, [410,100,20, 20]) pygame.draw.rect(gameDisplay, blue, [410,100,20, 20]) def clockTime(): global hour, minute, timeC clockT = time.ctime() ClockS = str(time.ctime()) hour = int(clockT[11:13]) if(hour > 12): hour = hour - 12 minute = int(clockT[14:16]) if(minute < 10): minute = "0" + str(minute) else: minute = str(minute) pygame.draw.rect(gameDisplay, white, [870,30,300, 50]) text75(clockT[0:10], black, 870, 30) timeC = str(hour) + ":" + minute pygame.draw.rect(gameDisplay, white, [1790,30,150, 50]) text75(timeC, black, 1790, 30) def draw(pic, x, y, xlen, ylen): pygame.draw.rect(gameDisplay, white, [x,y,xlen, ylen]) gameDisplay.blit(pic, (x,y)) def star(): global modeCnt global star1 if(modeCnt == 0): gameDisplay.blit(ttsu, (860,100)) return 1 if(modeCnt == 1): gameDisplay.blit(ttss, (860,100)) return 1 print("select") def clearLetter(): pygame.draw.rect(gameDisplay, white, [220,30,315, 50]) def MessWord(msg,color): screen_text = font75.render(msg, True, color) gameDisplay.blit(screen_text, [555,30]) def text(msg,color,x,y): screen_text = font50.render(msg, True, color) gameDisplay.blit(screen_text, [x,y]) def text75(msg,color,x,y): screen_text = font75.render(msg, True, color) gameDisplay.blit(screen_text, [x,y]) def text15(msg,color,x,y): screen_text = font15.render(msg, True, color) gameDisplay.blit(screen_text, [x,y]) def text25(msg,color,x,y): screen_text = font25.render(msg, True, color) gameDisplay.blit(screen_text, [x,y]) def clearWord(): pygame.draw.rect(gameDisplay, white, [555,30,290, 50]) def clearSms(): pygame.draw.rect(gameDisplay, white, [625,200,100, 25]) def Message(msg): global dot global dash cl = len(letter) if(cl == 1 or cl == 2 or cl == 3 or cl == 4 or cl == 5): if(letter[0] == "a"): gameDisplay.blit(dot, (220,30)) if(letter[0] == "b"): gameDisplay.blit(dash, (220,30)) if(cl == 2 or cl == 3 or cl == 4 or cl == 5): if(letter[1] == "a"): gameDisplay.blit(dot, (285,30)) if(letter[1] == "b"): gameDisplay.blit(dash, (285,30)) if(cl == 3 or cl == 4 or cl == 5): if(letter[2] == "a"): gameDisplay.blit(dot, (350,30)) if(letter[2] == "b"): gameDisplay.blit(dash, (350,30)) if(cl == 4 or cl == 5): if(letter[3] == "a"): gameDisplay.blit(dot, (415,30)) if(letter[3] == "b"): gameDisplay.blit(dash, (415,30)) if(cl == 5 ): if(letter[4] == "a"): gameDisplay.blit(dot, (480,30)) if(letter[4] == "b"): gameDisplay.blit(dash, (480,30)) def printSms(msg,color): screen_text = font75.render(msg, True, color) gameDisplay.blit(screen_text, [625,200]) def Mode(msg): global modeCnt if(modeCnt % 2 != 0): screen_text = font50.render(msg, True, black) gameDisplay.blit(screen_text, [870,140]) def booI(): global boo boo = True def boo0(): global boo2 boo2 = True def redDot(): global dotMove draw(redDot,1085, 550, 10, 10) def contact(): global modeSwitch, modeCnt, letter, listen, times, timep, dotMove contactListen = True times = 0 timep = 0 letter = "" if(modeCnt == 0): listen = False #draw(redDot1, 1090, 570, 10, 10) while(contactListen == True): if(GPIO.input(17) > .9): times += 1 if(GPIO.input(27) > .9): timep +=1 if(GPIO.input(17) == 0): if(times > 10000 ): print(str(times) + " Sp contact") dotMove += 1 print(dotMove) if(dotMove == 4): dotMove = 1 if(dotMove == 1): textShow() pygame.draw.rect(gameDisplay, white, [1485,550,10, 10]) pygame.draw.rect(gameDisplay, white, [1285,550,10, 10]) draw(redDot1,1085, 550, 10, 10) if(dotMove == 2): pygame.draw.rect(gameDisplay, white, [1485,550,10, 10]) pygame.draw.rect(gameDisplay, white, [1085,550,10, 10]) draw(redDot1,1285, 550, 10, 10) textShowA() if(dotMove == 3): pygame.draw.rect(gameDisplay, white, [1085,550,10, 10]) pygame.draw.rect(gameDisplay, white, [1285,550,10, 10]) draw(redDot1,1485, 550, 10, 10) textShowB() times = 0 if(GPIO.input(27) == 0): if(timep > 10000 ): print(str(timep) + " Ss contact") if(dotMove == 1): textShow() listen = True return Mitchell if(dotMove == 2): textShowA() listen = True return Will if(dotMove == 3): textShowB() listen = True return Bond timep = 0 #print("listen") #contactListen = False def sendTo(): global dotMove, modeSwitch, modeCnt, sentTo if(dotMove == 1): sentTo = Mitchell return Mitchell if(dotMove == 2): sentTo = Will return Will if(dotMove == 3): sentTo = Bond return Bond def Mitchin(): global txt1, txt2, txt3, txt4, txt5, txt6, txt7, txt8, txt9, txt10, smsin txt10 = txt9 txt9 = txt8 txt8 = txt7 txt7 = txt6 txt6 = txt5 txt5 = txt4 txt4 = txt3 txt3 = txt2 txt2 = txt1 txt1 = smsin #booA = False smsin = "" def Willin(): global txt1a, txt2a, txt3a, txt4a, txt5a, txt6a, txt7a, txt8a, txt9a, txt10a, smsin txt10a = txt9a txt9a = txt8a txt8a = txt7a txt7a = txt6a txt6a = txt5a txt5a = txt4a txt4a = txt3a txt3a = txt2a txt2a = txt1a txt1a = smsin #boo2A = False smsin = "" def Bondin(): global txt1b, txt2b, txt3b, txt4b, txt5b, txt6b, txt7b, txt8b, txt9b, txt10b, smsin txt10b = txt9b txt9b = txt8b txt8b = txt7b txt7b = txt6b txt6b = txt5b txt5b = txt4b txt4b = txt3b txt3b = txt2b txt2b = txt1b txt1b = smsin #boo2A = False smsin = "" def TwilioGui(): global smsin global response global sent global boo, booA global boo2, boo2A global modeCnt global txt1, txt2, txt3, txt4, txt5, txt6, txt7, txt8, txt9, txt10 global txt1a, txt2a, txt3a, txt4a, txt5a, txt6a, txt7a, txt8a, txt9a, txt10a '''if(booA == True): txt10 = txt9 txt9 = txt8 txt8 = txt7 txt7 = txt6 txt6 = txt5 txt5 = txt4 txt4 = txt3 txt3 = txt2 txt2 = txt1 txt1 = smsin booA = False smsin = ""''' if(boo2A == True): txt10a = txt9a txt9a = txt8a txt8a = txt7a txt7a = txt6a txt6a = txt5a txt5a = txt4a txt4a = txt3a txt3a = txt2a txt2a = txt1a txt1a = smsin boo2A = False smsin = "" if(modeCnt == 0): if(boo == True): txt10 = txt9 txt9 = txt8 txt8 = txt7 txt7 = txt6 txt6 = txt5 txt5 = txt4 txt4 = txt3 txt3 = txt2 txt2 = txt1 txt1 = sent boo = False sent = "" if(boo2 == True): txt10a = txt9a txt9a = txt8a txt8a = txt7a txt7a = txt6a txt6a = txt5a txt5a = txt4a txt4a = txt3a txt3a = txt2a txt2a = txt1a txt1a = sent boo2 = False sent = "" def txtColor(msg): if(msg[0] == "+"): return blue else: return red def textShow(): global number global txt1, txt2, txt3, txt4, txt5, txt6, txt7, txt8, txt9, txt10 pygame.draw.rect(gameDisplay, white, [860,600,1000, 420]) if(txt1 != ""): txtFont(txt1[1:], txtColor(txt1), 860, 980) if(txt2 != ""): text25(txt2[1:], txtColor(txt2), 860, 950) if(txt3 != ""): text25(txt3[1:], txtColor(txt3), 860, 920) if(txt4 != ""): text25(txt4[1:], txtColor(txt4), 860, 890) if(txt5 != ""): text25(txt5[1:], txtColor(txt5), 860, 860) if(txt6 != ""): text25(txt6[1:], txtColor(txt6), 860, 830) if(txt7 != ""): text25(txt7[1:], txtColor(txt7), 860, 800) if(txt8 != ""): text25(txt8[1:], txtColor(txt8), 860, 770) if(txt9 != ""): text25(txt9[1:], txtColor(txt9), 860, 740) if(txt10 != ""): text25(txt10[1:], txtColor(txt10), 860, 710) def textShowA(): global number global txt1a, txt2a, txt3a, txt4a, txt5a, txt6a, txt7a, txt8a, txt9a, txt10a pygame.draw.rect(gameDisplay, white, [860,600,1000, 420]) if(txt1a != ""): text25(txt1a[1:], txtColor(txt1a), 860, 980) if(txt2a != ""): text25(txt2a[1:], txtColor(txt2a), 860, 950) if(txt3a != ""): text25(txt3a[1:], txtColor(txt3a), 860, 920) if(txt4a != ""): text25(txt4a[1:], txtColor(txt4a), 860, 890) if(txt5a != ""): text25(txt5a[1:], txtColor(txt5a), 860, 860) if(txt6a != ""): text25(txt6a[1:], txtColor(txt6a), 860, 830) if(txt7a != ""): text25(txt7a[1:], txtColor(txt7a), 860, 800) if(txt8a != ""): text25(txt8a[1:], txtColor(txt8a), 860, 770) if(txt9a != ""): text25(txt9a[1:], txtColor(txt9a), 860, 740) if(txt10a != ""): text25(txt10a[1:], txtColor(txt10a), 860, 710) def textShowB(): global number global txt1b, txt2b, txt3b, txt4b, txt5b, txt6b, txt7b, txt8b, txt9b, txt10b pygame.draw.rect(gameDisplay, white, [860,600,1000, 420]) if(txt1b != ""): text25(txt1b[1:], txtColor(txt1b), 860, 980) if(txt2b != ""): text25(txt2b[1:], txtColor(txt2b), 860, 950) if(txt3b != ""): text25(txt3b[1:], txtColor(txt3b), 860, 920) if(txt4b != ""): text25(txt4b[1:], txtColor(txt4b), 860, 890) if(txt5b != ""): text25(txt5b[1:], txtColor(txt5b), 860, 860) if(txt6b != ""): text25(txt6b[1:], txtColor(txt6b), 860, 830) if(txt7b != ""): text25(txt7b[1:], txtColor(txt7b), 860, 800) if(txt8b != ""): text25(txt8b[1:], txtColor(txt8b), 860, 770) if(txt9b != ""): text25(txt9b[1:], txtColor(txt9b), 860, 740) if(txt10b != ""): text25(txt10b[1:], txtColor(txt10b), 860, 710) #Sensor Methods def backSpace(): global letter letterB = letter[:(len(letter) - 1)] letter = letterB letterB = "" return letter def backSpaceW(): global word letterB = word[:(len(word) - 1)] word = letterB letterB = "" return word def library(): character = "" cl = len(letter) if(cl == 1): if(letter[0] == "a"): character += "and" if(letter[0] == "b"): character += "you" if(cl == 2): if(letter[0] == "a"): if(letter[1] == "a"): character += "that" elif(letter[1] == "b"): character += "was" if(letter[0] == "b"): if(letter[1] == "a"): character += "are" elif(letter[1] == "b"): character += "for" if(cl == 3): if(letter[0] == "a"): if(letter[1] == "a"): if(letter[2] == "a"): character += "with" elif(letter[2] == "b"): character += "his" elif(letter[1] == "b"): if(letter[2] == "a"): character += "have" elif(letter[2] == "b"): character += "they" if(letter[0] == "b"): if(letter[1] == "a"): if(letter[2] == "a"): character += "this" elif(letter[2] == "b"): character += "from" elif(letter[1] == "b"): if(letter[2] == "a"): character += "but" elif(letter[2] == "b"): character += "had" if(cl == 4): if(letter[0] == "a"): if(letter[1] == "a"): if(letter[2] == "a"): if(letter[3] == "a"): character += "some" elif(letter[3] == "b"): character += "what" elif(letter[2] == "b"): if(letter[3] == "a"): character += "there" elif(letter[1] == "b"): if(letter[2] == "a"): if(letter[3] == "a"): character += "l" elif(letter[2] == "b"): if(letter[3] == "a"): character += "p" elif(letter[3] == "b"): character += "j" elif(letter[0] == "b"): if(letter[1] == "a"): if(letter[2] == "a"): if(letter[3] == "a"): character += "b" elif(letter[3] == "b"): character += "x" elif(letter[2] == "b"): if(letter[3] == "a"): character += "c" elif(letter[3] == "b"): character += "y" elif(letter[1] == "b"): if(letter[2] == "a"): if(letter[3] == "a"): character += "z" elif(letter[3] == "b"): character += "q" if(cl == 5): if(letter[0] == "a"): if(letter[1] == "b"): if(letter[2] == "b"): if(letter[3] == "b"): if(letter[4] == "b"): character += "1" if(letter[1] == "a"): if(letter[2] == "b"): if(letter[3] == "b"): if(letter[4] == "b"): character += "2" if(letter[2] == "a"): if(letter[3] == "b"): if(letter[4] == "b"): character += "3" if(letter[3] == "a"): if(letter[4] == "b"): character += "4" if(letter[4] == "a"): character += "5" if(letter[0] == "b"): if(letter[1] == "a"): if(letter[2] == "a"): if(letter[3] == "a"): if(letter[4] == "a"): character += "6" if(letter[1] == "b"): if(letter[2] == "a"): if(letter[3] == "a"): if(letter[4] == "a"): character += "7" if(letter[2] == "b"): if(letter[3] == "a"): if(letter[4] == "a"): character += "8" if(letter[3] == "b"): if(letter[4] == "a"): character += "9" if(letter[4] == "b"): character += "0" if(letter[0] == "a"): if(letter[1] == "b"): if(letter[2] == "a"): if(letter[3] == "b"): if(letter[4] == "a"): character += "+" if(letter[0] == "b"): if(letter[1] == "a" and letter[2] == "a"): if(letter[3] == "a"): if(letter[4] == "b"): character += "=" if(letter[3] == "b"): if(letter[4] == "a"): character += "/" return character def getChar(): character = "" cl = len(letter) if(cl == 1): if(letter[0] == "a"): character += "e" if(letter[0] == "b"): character += "t" if(cl == 2): if(letter[0] == "a"): if(letter[1] == "a"): character += "i" elif(letter[1] == "b"): character += "a" if(letter[0] == "b"): if(letter[1] == "a"): character += "n" elif(letter[1] == "b"): character += "m" if(cl == 3): if(letter[0] == "a"): if(letter[1] == "a"): if(letter[2] == "a"): character += "s" elif(letter[2] == "b"): character += "u" elif(letter[1] == "b"): if(letter[2] == "a"): character += "r" elif(letter[2] == "b"): character += "w" if(letter[0] == "b"): if(letter[1] == "a"): if(letter[2] == "a"): character += "d" elif(letter[2] == "b"): character += "k" elif(letter[1] == "b"): if(letter[2] == "a"): character += "g" elif(letter[2] == "b"): character += "o" if(cl == 4): if(letter[0] == "a"): if(letter[1] == "a"): if(letter[2] == "a"): if(letter[3] == "a"): character += "h" elif(letter[3] == "b"): character += "v" elif(letter[2] == "b"): if(letter[3] == "a"): character += "f" elif(letter[1] == "b"): if(letter[2] == "a"): if(letter[3] == "a"): character += "l" elif(letter[2] == "b"): if(letter[3] == "a"): character += "p" elif(letter[3] == "b"): character += "j" elif(letter[0] == "b"): if(letter[1] == "a"): if(letter[2] == "a"): if(letter[3] == "a"): character += "b" elif(letter[3] == "b"): character += "x" elif(letter[2] == "b"): if(letter[3] == "a"): character += "c" elif(letter[3] == "b"): character += "y" elif(letter[1] == "b"): if(letter[2] == "a"): if(letter[3] == "a"): character += "z" elif(letter[3] == "b"): character += "q" if(cl == 5): if(letter[0] == "a"): if(letter[1] == "b"): if(letter[2] == "b"): if(letter[3] == "b"): if(letter[4] == "b"): character += "1" if(letter[1] == "a"): if(letter[2] == "b"): if(letter[3] == "b"): if(letter[4] == "b"): character += "2" if(letter[2] == "a"): if(letter[3] == "b"): if(letter[4] == "b"): character += "3" if(letter[3] == "a"): if(letter[4] == "b"): character += "4" if(letter[4] == "a"): character += "5" if(letter[0] == "b"): if(letter[1] == "a"): if(letter[2] == "a"): if(letter[3] == "a"): if(letter[4] == "a"): character += "6" if(letter[1] == "b"): if(letter[2] == "a"): if(letter[3] == "a"): if(letter[4] == "a"): character += "7" if(letter[2] == "b"): if(letter[3] == "a"): if(letter[4] == "a"): character += "8" if(letter[3] == "b"): if(letter[4] == "a"): character += "9" if(letter[4] == "b"): character += "0" if(letter[0] == "a"): if(letter[1] == "b"): if(letter[2] == "a"): if(letter[3] == "b"): if(letter[4] == "a"): character += "+" if(letter[0] == "b"): if(letter[1] == "a" and letter[2] == "a"): if(letter[3] == "a"): if(letter[4] == "b"): character += "=" if(letter[3] == "b"): if(letter[4] == "a"): character += "/" return character #Main Methods def input_output(): global timep, times, letter, word, sent, libCount, modeCnt, listen, sentTo, dotMove times = 0 timep = 0 while True: if(listen == True): while(listen == True): if(GPIO.input(17) > .9): times += 1 if(GPIO.input(27) > .9): timep +=1 if(GPIO.input(27) == 0): if(timep > 100000): print(str(timep) + " Ls") print(sent) if(modeCnt % 2 == 0and sent != ""): message = client.messages.create(body = sent, to= sendTo(), from_="+12052367926") sent = "-" + sent if(dotMove == 1): booI() if(dotMove == 2): boo0() if(modeCnt % 2 != 0): espeak.synth(sent) sent = "" pygame.draw.rect(gameDisplay, white, [870,140,1000, 300]) elif(timep > 70000 and timep < 100000): print(str(timep) + " LMs") libCount += 1 if(libCount % 2 == 0): sent += library() letter ="" elif(timep > 40000 and timep < 70000): print(str(timep) + " sMs") sent += (word + " ") word = "" elif(timep > 10000 and timep < 40000): print(str(timep) + " Ss") word += getChar() letter = "" clearLetter() timep = 0 if(GPIO.input(17) == 0): if(times > 130000): print(str(times) + " Lp") print(modeCnt) if(modeCnt == 1): modeCnt = modeCnt - 1 letter == "" sent = "" contact() elif(modeCnt == 0): modeCnt += 1 letter = "" sent = "" if(times < 110000 and times > 70000): print(str(times) + " LMp") if(letter == ""): backSpaceW() else: backSpace() elif(times > 40000 and times < 70000): print(str(times) + " SMp") letter += "b" elif(times > 10000 and times < 40000): print(str(times) + " Sp") letter += "a" times = 0 def GUI(): global letter global word global smsin global mcImg, dotMove gameDisplay.blit(bk, (0,0)) gameDisplay.blit(mcImg, (5,5)) gameDisplay.blit(dd, (215,5)) gameDisplay.blit(wd, (555,5)) gameDisplay.blit(cd, (855,5)) gameDisplay.blit(ttss, (860,100)) #pygame.draw.lines(gameDisplay,black, False, [(210,0), (210,1080)], 5) #pygame.draw.lines(gameDisplay,black, False, [(850,70), (1920,70)], 5) #pygame.draw.lines(gameDisplay,black, False, [(210,70), (550,70), (550,0)], 5) #pygame.draw.lines(gameDisplay,black, False, [(550,70), (850,70), (850, 0), (850, 1080)], 5) #pygame.draw.lines(gameDisplay,black, False, [(850,540), (1920,540)], 5) #text("Text to Speech", red, 860, 80) text("Twilio", blue, 860, 550) text("Library", black, 490, 180) draw(mitchPic,1100, 550, 150, 50) draw(willPic,1300, 550, 150, 50) draw(bondPic,1500, 550, 150, 50) while 1: clearWord() clearLetter() clockTime() #draw(tts, 860, 100, 260, 40) star() TwilioGui() if(dotMove == 1): textShow() if(dotMove == 2): textShowA() if(dotMove == 3): textShowB() #gameDisplay.blit(mcImg, (0,0)) MessWord(word,black) Message(letter) Mode(sent) clock.tick(15) pygame.display.update() thread.start_new_thread(GUI,()) thread.start_new_thread(input_output,()) thread.start_new_thread(incomingSms,()) thread.start_new_thread(TwilioGui,())