[time-nuts] beaglebones, time, web services

Bob Camp kb8tq at n1k.org
Sat Jul 4 19:31:25 UTC 2015


Hi

As silly as it sounds, having a separate board for the user i/o is probably the best way to go.
You already have an empire of devices that (somehow) chat with each other. The barrier of 
“it’s all on one device” has been broken even before i/o has been added. 

The world of user input is a bit messy. The typical expectations for speed, help, and fancy looking pages
are pretty high these days. Between input validation, context based help, and feature expansion, the 
i/o processor may be fairly busy from time to time. 

=====

Once you get past that part of it, it’s all a bunch of “that depends” and personal preference. There is very little
right and wrong. For very little money, you can go from a single core to a quad core device on your i/o 
processor. The same is true of RAM and flash. If this is a one up (or few dozen) sort of thing, optimizing the
board probably makes less sense than attacking the (inevitable) multitude of Ardunio gear controlling the 
rest of it. 

=====

Assuming that we’re not already way off track - I’d use a “real” web server to feed the user. You get the full
range of modules that way. You can handle anything you decide you need as the feature list expands. I’d back
it up with Python, just because it seems to work fine and I already have worked my way up the learning curve. Others
would (I’m sure) recommend languages that they are more familiar with. They all will get you to the same end
result. If you want to be cool, there’s always Node.js …

Bob

> On Jul 4, 2015, at 9:13 AM, 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_lists.febo.com mailing list