Subscribe:

Ads 468x60px

Sunday, August 7, 2011

Arduino and Python

          Arduino and Python are the best combination for making projects. Data from arduino can recieve serially from arduino to python .For receiving serial data .there is a module called pyserial in python .It is very easy to handle with pyserial module.




Reading from Arduino

>>> import serial
>>> ser = serial.Serial('/dev/tty.usbserial', 9600)
>>> while 1:
...             ser.readline()


Writing data to Arduino is easy too:

>>> import serial
>>> ser = serial.Serial('/dev/tty.usbserial', 9600)
>>> ser.write('data')


I am giving some links related to pyserial and arduino



0 comments:

Post a Comment