Let's Make Robots!

Sending serial from python to an arduino

I'm working on a project where I send a bunch of data through an arduino to my laptop.  I'm using python serial to read in the serial data.  That part is working fine.  Then I do some processing and I want to send the results back to the arduino.  This part is not working so well.  

It seems like python  serial.write()  only likes to send strings?  Right now I'm trying to send back one integer value.  Any ideas how to do that?  

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Maybe one of these?

First one i found that looked usefull was this one:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1274205532

But then i found THIS one: 

http://arduino.cc/playground/Interfacing/Python

I did search but missed that post.  I got a bit lost int he pyserial docs.