Go Down

Topic: Arduino 1.0 Serial - major RAM hog (Read 4700 times) previous topic - next topic

fungus


Quote
Not particulary pretty...


I disagree.  In my opinion, that would be a simple effective way to optionally alter the core at compile-time.



I don't think you even need that. You could have a few different "Serial" classes in your library. The default one would use the least resources and some other ones could have extra buffering, called (eg) "SerialWithBufferedSendAndReceive". Now in your sketch you can do:

#define Serial SerialWithBufferedSendAndReceive

and you'll be using the other one.

nb. This assumes you want any send buffering at all. I really don't see send buffering as an advantage on a limited microcontroller like the Arduino.

If it was a big PC then I'd be like, "yeah, whatever, dude", but it isn't. It's a gadget with 2k of RAM and 32k of program. The time spent programming/discussing this could be better spent on other things.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Go Up