Advertisement
Guest User

Untitled

a guest
Apr 4th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. pi@raspberrypi:~ $ python HexCodeImporter2.py
  2. Traceback (most recent call last):
  3. File "HexCodeImporter2.py", line 1, in <module>
  4. import mySQL.connector
  5. ImportError: No module named mySQL.connector
  6.  
  7. import mySQL.connector
  8. import serial
  9.  
  10.  
  11. ser = serial.Serial('/dev/ttyACM0',9600)
  12. s = [0]
  13. while True:
  14. read_serial = ser.readline()
  15. print read_serial
  16.  
  17. con = mySQL.connector.connect(user="*******",password="********",host="sql8.freemysqlhosting.net",port="3306",database="CheckIn_System")
  18.  
  19.  
  20. c = conn.cursor()
  21.  
  22. c.execute("insert into CheckIn_System values(read_serial,20170404132401)")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement