Arduino and Python


If you want to read Arduino serial from Python.

Install pySerial:

pip intall pyserial

the code:

import serial
...
print('# Arduino Reader - hackweb')
print('entering loop...')

ardu = serial.Serial('COM3', 115200)

time.sleep(2)

while True:

print(ardu.readline())