Hi list

Progress is still present, although hampered by outside influences... ;)

Project: Getting Bering to control stepper motor, to open/close blinds.
Status: Hardware is in place. Basic software/routines, getting closer.

I've been spending some time familiarizing myself with the GET-method of
getting data into the box, through the weblet. At this point I have some
'proof of concept' testpages, that accept input through forms, parse the
resulting QUERY_STRING, and echo back to a new page. This all works
pretty much as I want it, even if my sed scripts *are* a bit clunky...

Next step will be to have that data written to a file instead of just
out to a page. Now, since this whole thing is meant to be time-centric
(run at specified times) the logical thing to do is have the cgi-script
write to a crontab, with the appropriate format.

For a number of reasons, I'm not very comfortable with the idea of
letting my own scripts modify root's crontab, one of the more obvious
being that my scripts would have to run with root-privs to do that.

I'm beginning to think that I should probably add a uid to handle all
this crap, instead of letting it run as sh-hhtp, but either way I'd like
to get some clarification on a couple of issues:

1) How does cron handle itself on Bering? I.e. will it find and execute
a user-crontab by itself?

2) Any tricks/hints/pointers on how to actually writing to a file? Or
rather *modifying* a file that is already there (i.e. changing some of
the fields in a crontab line from f.x. 30 6 * * * to 00 7 * * *)

3) Are there any good candidates (scripts/routines) already present in
Bering/packages, that I can use as starting point for 2) ?

I must admit that I haven't done a great lot of research on this, before
asking. But, as usual, what I'm asking is more on the order of 'where
to look for docs on this' or 'advice/considerations, please?' rather 
than 'tell me what to write where', so I hope it's o.k...

Man, this just keeps growing... but it's *fun*! (Next thing you know,
I'm gonna want to have the ability to specify different runtimes, for
different days of the week ;)

Oh yeah, one other thing;
Setting the time to open/close is all very nice, but I'd like to be able
to specify a *duration* of the 'sunrise' as well...

There are ~576 'steps' of the stepper motor from extreme-open to
extreme-closed. Any idea how to distribute x steps per minute...?

TIA

Jon Clausen

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

------------------------------------------------------------------------
leaf-user mailing list: [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to