Page 254 - MDP2022-2
P. 254

s1  =  cv2.imread("/home/cjs/projectAI/webserver/root/images/Select_1.png",
              cv2.IMREAD_UNCHANGED)

              s2  =  cv2.imread("/home/cjs/projectAI/webserver/root/images/Select_2.png",
              cv2.IMREAD_UNCHANGED)

              s3  =  cv2.imread("/home/cjs/projectAI/webserver/root/images/Select_3.png",
              cv2.IMREAD_UNCHANGED)
              s4  =  cv2.imread("/home/cjs/projectAI/webserver/root/images/Select_4.png",
              cv2.IMREAD_UNCHANGED)

              s5  =  cv2.imread("/home/cjs/projectAI/webserver/root/images/Select_5.png",
              cv2.IMREAD_UNCHANGED)

              s6  =  cv2.imread("/home/cjs/projectAI/webserver/root/images/Select_6.png",
              cv2.IMREAD_UNCHANGED)

              s7  =  cv2.imread("/home/cjs/projectAI/webserver/root/images/Select_7.png",
              cv2.IMREAD_UNCHANGED)

              s8  =  cv2.imread("/home/cjs/projectAI/webserver/root/images/Select_8.png",
              cv2.IMREAD_UNCHANGED)

              s9  =  cv2.imread("/home/cjs/projectAI/webserver/root/images/Select_9.png",
              cv2.IMREAD_UNCHANGED)

              s10  =  cv2.imread("/home/cjs/projectAI/webserver/root/images/Select_10.png",
              cv2.IMREAD_UNCHANGED)
              s11  =  cv2.imread("/home/cjs/projectAI/webserver/root/images/Select_11.png",
              cv2.IMREAD_UNCHANGED)

              s12  =  cv2.imread("/home/cjs/projectAI/webserver/root/images/Select_12.png",
              cv2.IMREAD_UNCHANGED)

              db  =  pymysql.connect(host='localhost',  user='cjs',  password='1234',  db='address',  charset='utf8')

              db  =  db.cursor()

              sql  =  "SELECT  seat  FROM  address  WHERE  address.key=1"

              db.execute(sql)

              seat1  =  db.fetchone()

              seat1  =  seat1[0]

              sql  =  "SELECT  seat  FROM  address  WHERE  address.key=2"
              db.execute(sql)

              seat2  =  db.fetchone()

              seat2  =  seat2[0]

              def  led(pin):
   249   250   251   252   253   254   255   256   257   258   259