Serial port and run time impact

Good Morning folks. Newbee here.

This is short term problem, the real fix (proper data logging to SD card and WiFi offload) is a few days away, but I really need a small fix now. As in like want to show a device working this afternoon and LOG (just an array[200][3]) fills up too quick and would like to stay at < 80% variable space usage on MEGA.

Off load to default Serial port got to suffice. I wish to dump, say, 300 unsigned long from the array to serial port while watching for machine vibrations, and want to be back doing analog reads within 30 or 40 millis.

Questions:

  1. Does the generated code buffer Serial.print() ? That is, does the next instruction have to wait on the output to complete?
  2. Had no joy setting Port on laptop faster. It is an old Dell Latitude running Windows 7. When I changed sketch from 9600baud to faster and went into Windows device manager and set port speed to equal it I got funny looking characters in the built-in serial monitor. What else do I need to do?

Suggestions for what to do in the next 2 hours?

Thanks,
Chuck in Dallas

if you look at
arduino serial basics
it states As of version 1.0, serial transmission is asynchronous; Serial.print() will return before any characters are transmitted.
clearly the buffer size is limited (64 bytes?) so if you fill it up you will then loose data
you can change the buffer size
serial buffer size
even a fairly old laptop should be able to display characters are faster than 9600baud
what baud rate did you try?
do you use the Arduino IDE sreial monitor or a terminal emulator ?

Did you change the baud rate in the serial monitor to match the baud rate in the sketch?

baud.jpg

horace:
clearly the buffer size is limited (64 bytes?) so if you fill it up you will then loose data
you can change the buffer size
serial buffer size

Equally clearly, you are not as familiar with Serial Input Basics as you could be.

With my code it is possible to receive as much data as you have room for while still using the standard 64 byte serial input buffer. You just have to change the value in numChars in my code.

...R

Gentlemen, thanks very much.

  1. I did not change in the serial monitor.
  2. will read code from Robin2.

Time is up now, must go out into the world and appear as a normal person for couple of days. Will report back...

appear as a normal person

Challenging for many of us.

groundFungus:
Challenging for many of us.

I could do with some lessons. :slight_smile:

...R