jbinkleyj / cellbots

Automatically exported from code.google.com/p/cellbots
0 stars 0 forks source link

Solve two-way serial communication #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently the software only sends serial output by echo to /dev/ttyMSM2, 
which goes from the phone to the Arduino RX pin. We'd like to get commands 
sent from the Arduino TX pin accepted by the phone.

The hardware should support this but pySerial isn't included in the Android 
Scripting Environment so we need a hack.

Original issue reported on code.google.com by rhickman on 1 Mar 2010 at 9:52

GoogleCodeExporter commented 9 years ago

Original comment by rhickman on 1 Mar 2010 at 9:53

GoogleCodeExporter commented 9 years ago

Original comment by rhickman on 26 Mar 2010 at 4:14

GoogleCodeExporter commented 9 years ago
The python script now has a thread that reads any serial input and speaks it. 
The
thread is not 100% stable for an currently unknown reason but I'll work on it 
soon.
I have worked around the serial debugger problem by having the arduino wait 
100ms and
then flush the serial input after sending anything. Not pretty but it works.

Original comment by glen.arrowsmith on 31 Mar 2010 at 4:59

GoogleCodeExporter commented 9 years ago
Reader thread script is now stable and works well. 

Arduino still waits 100ms and flushes as a work around the kernel serial 
debugging. 

Original comment by glen.arrowsmith on 7 Apr 2010 at 2:45