[time-nuts] web presentation of data

Chris Albertson albertson.chris at gmail.com
Tue Aug 7 19:22:25 UTC 2012

One good reason for doing as little as possible in a micro-controller is
> that they are often used to collect raw  data with as little latency as
> possible. Doing web serving on a single slowish core in that case is not a
> good idea. I have a bunch of Soekris doing data collection and if I start
> to do compute intensive tasks on one, it skews the timing, so I use a
> completely independent one to do the web serving, with the data collectors
> providing access to data via nfs which does not seen to impact the timing
> much even though I can't guarantee that requests are satisfied in otherwise
> idle time . I like the idea of  client side graphing. It probably exists
> already somewhere though I haven't checked details - RGraph pops up with
> google.
You are right about i being easier to not mix real-time and backround tasks
on a small uP.   But it can be done.  The way to do it is to make the
real-time task interrup driven.  You can use a timer that goes off (say) 50
ties per second and in the handler you do your real-tie data collection or
poll the hardware, read sensors or whatever.  Then in the background task
you run the web server.   This way there is never a chance of something
like network requests slowing down the data collection..    A simple two
task "multi-tasker" is easy.  It gets harder when you have more tasks and
I'd fgo with some kind of OS even it that required a larger uP.

That said.  Even if it is easy I'dstill put the web server on a "real"
computer and only pass data out of the arduino.  But it could be done.  I
build a web server (and an FTP server) into a CCD camera and there is no
performance issue at all.  Even during an exposure while reading out the
CCD chip.

As for going the graphics in the client.   That really is easy now that
every client computer has a PDF viewer.  Simply make your graph a PDF

Chris Albertson
Redondo Beach, California

More information about the Time-nuts_lists.febo.com mailing list