Page 696 - 3-2
P. 696

# 기본 내장 모듈(omxplayer      제외)
            import time
            import sys                                  # 시스켄 제어 관련 모듈
            import pygame                                # 디스플레이 관련 모듈
            from pygame.locals import *
            import Read2
            import time
            import serial
            import pymysql


            # 파이게임 실행
            pygame.init()


            # 디스플레이 프레임 설정
            TARGET_FPS = 50
            clock = pygame.time.Clock()


            # 디스플레이 크기 설정
            #FULLSCREEN define    을 통해서 전체화면 활성화
            #screen = pygame.display.set_mode((800, 480), HWSURFACE | DOUBLEBUF | FULLSCREEN)
            # 전체화면
            screen = pygame.display.set_mode((800, 480), HWSURFACE | DOUBLEBUF) #         창모드
            pygame.display.set_caption('POP-PIN')


            # 사진 불러오기
            muzi1 = pygame.image.load('1.png')
            muzi2 = pygame.image.load('2.png')


            screen.blit(muzi1,(0,0))
            pygame.display.flip()


            card="1412516120252"
            ReadData=" "
            wrdata=" "
            tagdata=" "
            HOST='192.168.0.57'
            PORT=10527
            ser = serial.Serial('/dev/ttyS0',9600,timeout=1)
            conn=pymysql.connect('127.0.0.1','root' ,'raspberry','MDP')
            cur=conn.cursor()
            sql="select * from information"
            mon=0


            while True:
                try:


                                                         - 696 -
   691   692   693   694   695   696   697   698   699   700   701