I've written a stationery bicycle computer app that processes my reed switch data, and then sends a stream of data to a Processing app for display.
I've noticed that whenever I stop and/or restart my Processing app, the total ride-time as calculated by my Arduino resets itself. Does this have something to do with the serial connection being reset?
Is there a way I can make Arduino keep running its program regardless of whether or not Processing is listening on the other end?
When you say serial, do you mean through the USB cable, or the rx-tx pins?
I've noticed the resetting behaviour on the USB cable (when also having the arduino powered through an external supply), but not when using a serial device on the rx-tx pins (bluetooth for instance).
Hm, interesting. Yes, I'm using USB. Ideally I'd like to be able to connect the device to USB to "upload" my ride, but then have the freedom to disconnect, go for a ride, and then plug it back in again. Is that possible?
Thanks, Paul. I didn't know the term was "auto-reset", so that will help!
The SD card option is a good one, except that then I can't do live data plotting when riding stationary. I'm hoping to set it up so that I can go for rides outdoors if I want to, but also ride in-place with a big graphical display if I prefer.
A free alternative to SD is to use the on board EEPROM.
You could stash values away in there, and pick up where it leaves off. You could even switch the power off.
You would have to figure out when to store, but you'd have the same problem with SD.
I think there are versions of the Arduino out there that have switches/jumpers to allow you to enable/disable the auto-reset functionality; while you could likely mod a standard Arduino to disable the auto-reset, or hack in such a reversible mod, it might be better to track down a board with it already built in (probably something from Seeedstudio)...