Robin2:
@mHo2, you are not providing the sort of comprehensive picture of your project requirement that would enable me to help.At 115200 baud the Arduino should send or receive about 11000 bytes per second so 640 bytes should take about 60 millisecs. I know from trials I carried out a few months ago that this is achievable.
...R
Hey Robin,
Sorry about that. I'll try to fill you in without wasting too much of your time.
The end goal here is to have a multiplexed RGB LED array (16x10). This incorporates the following:
160 common anode RGB LED's
3x TLC5940
2x 595 shift registers with Transistors for current supply.
When I loop through and 'draw' to the screen I am shifting the register and setting which anodes to turn on with the TLC5940.
Inbetween my draw function I am both sending and receiving data on the microcontroller.
This data is being sent over serial to pySerial to be dealt with. (in this came a custom python game).
The data being SENT from the uC is proximity sense data of 160 IR photodiodes
The data being RECEIVED by the uC is which LED's to turn on and at what intensity.
Hope that helps?
EDIT:
Further more, it seems as though as long as i'm not writing my serial data to python, this code works flawlessly (i.e. just writing to the serial monitor). What i'm thinking is one of two things:
1: Serial is blocking and python cannot read the data as quickly as the serial monitor
2: Something is messed up in the python code
2 seems very unlikely as the reading and writing is done in separate threads. Furthermore the code runs fine if i'm not writing to python.