Page 305 - 3-2
P. 305
다 라즈베리파이 파이썬 소스. ( )
# top.py
# -*- coding: utf-8 -*-
import pygame # pygame 모듈을 import
from pygame.locals import * # pygame.locals 하위 모듈을 import
import sys
import time
import os
import serial
from one_serial import *
from one import *
def main():
os.system("export GOOGLE_APPLICATION_CREDENTIALS=/home/pi/trainspeech.json")
first()
if __name__ == '__main__': main()
########################################################
# one.py
# -*- coding: utf-8 -*-
import pygame # pygame 모듈을 import
from pygame.locals import * # pygame.locals 하위 모듈을 import
import sys
import time
import os
import serial
from one_serial import *
from sensor import *
from transcribe_streaming import *
from one_serial_voice import *
import subprocess
#def system_restart():
# python = sys.executable
# os.execl(python, python, * sys.argv)
#system_restart()
# 디스플레이 크기 설정
# FULLSCREEN define 을 통해서 전체화면 활성화
screen = pygame.display.set_mode((1024,600), DOUBLEBUF)
ser = None
LEFT = 1 # 왼쪽 버튼에 대한 버튼 인덱스
pygame.display.set_caption(' 너목들 지하철 노선 안내도')
- 305 -