Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pi@raspberrypi:~ $ python HexCodeImporter2.py
- Traceback (most recent call last):
- File "HexCodeImporter2.py", line 1, in <module>
- import mySQL.connector
- ImportError: No module named mySQL.connector
- import mySQL.connector
- import serial
- ser = serial.Serial('/dev/ttyACM0',9600)
- s = [0]
- while True:
- read_serial = ser.readline()
- print read_serial
- con = mySQL.connector.connect(user="*******",password="********",host="sql8.freemysqlhosting.net",port="3306",database="CheckIn_System")
- c = conn.cursor()
- c.execute("insert into CheckIn_System values(read_serial,20170404132401)")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement