Pairing Arduino with Python is a great way to build projects. You can send data serially from the Arduino to Python, and to receive that serial data Python provides a module called pyserial. Working with the pyserial module is straightforward.
Reading data from Arduino
Sending data to Arduino is just as simple:
Here are a few links related to pyserial and Arduino
Reading data from Arduino
>>> import serial
>>> ser = serial.Serial('/dev/tty.usbserial', 9600)
>>> while 1:
... ser.readline()
>>> import serial
>>> ser = serial.Serial('/dev/tty.usbserial', 9600)
>>> ser.write('data')
Here are a few links related to pyserial and Arduino




0 comments:
Post a Comment