[time-nuts] beaglebones, time, web services

Tom Harris celephicus at gmail.com
Mon Jul 6 18:19:40 EDT 2015


Since you want simple just use a CGI script written in your language of
choice. Very easy technology to learn, Python has support libraries out of
the box if you want. You have a webpge with carious simple controls on it
like buttons etc, you click a special button that posts a request to a URL,
the webserver runs a script that generates the response, the webserver
serves it out, your browser displays it. Why bother with learning a
framework? Messing about with mechanics is far more fun!


Tom Harris <celephicus at gmail.com>

On 4 July 2015 at 23:13, Jim Lux <jimlux at earthlink.net> wrote:

> I've got a project I'm working on to make a sophisticated sundial with
> moving mirrors.  I've got a batch of Arduinos that move the mirrors to the
> appropriate places, given the current sun angle, etc.
>
> I've got a beaglebone that runs some python code to calculate sun angle
> based on time
>
> The beaglebone will have a GPS feeding it to get time.
>
> BUT now, I'd like to add a web interface, so that it can be manipulated by
> a mobile device using a browser.
>
> One way I can think of is to run some sort of limited web server. there
> are a couple that come with the beaglebone, including the python
> "simplehttpserver".
>
> But I'm sort of stuck on the interface between the webserver and the other
> code running.
>
> I've done this kind of thing where the one task goes out and updates files
> in the tree that's being served by the web server, and that works fine for
> "status display" kinds of things that don't update very quickly. It's also
> nicely partitioned.
>
> but I want to be able to change the behavior of the system (e.g. by having
> the server respond to a PUT or something)
>
> Is the best scheme to go in and modify the webserver code to look for
> specific URLs requested, and then fire off some custom code to do what I
> want?
>
> I'm not particularly interested in javascript, and would prefer python.
>
>
> Or are there libraries that make this more cookbook? (the little "getting
> started with beaglebone" book talks about flask)
>
> There's quite a few websites out there where someone has done some sort of
> "home automation", but they tend to be a bit light on the analysis of pros
> and cons of implementation architectures: "I built X using Y and Z and it
> sort of works".
>
>
> Actually, along a similar line.. my "solar position" code isn't very
> pretty (it's sort of replicating some code I wrote in Basic a long time
> ago, with some changes from stuff I cribbed from ccmatlab).  If someone
> knows of a python package that just "does this", I'd love to hear about
> it.  Either Az El, or X,Y,Z in ECI or ECF would do.
>
>
>
> _______________________________________________
> time-nuts mailing list -- time-nuts at febo.com
> To unsubscribe, go to
> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
>


More information about the time-nuts mailing list