Does Nanonote give any signal when battery is near shutdown voltage?

Delbert Franz ddf at sonic.net
Sun Apr 18 01:19:12 EDT 2010


On Tuesday 13 April 2010, Ron K. Jeffries wrote:
> Don't forget that Nanonote has Lua, a very capable yet lightweight
> scripting language. My understanding is Lua has capability
> to interface with GTK
> ---
> Ron K. Jeffries
> 
> >
> > When I get time, I want to investigate adding numpy to the python
> > already there--then I can do some interesting things on this little
> > jewel-even with its current limits:) Would also like the python-gtk
> > package as well.  Then this would be a really sweet little gizmo!
> > (I'm assuming we can reach the DirectFB from python-gtk.)
> >

Thanks for the tip about Lua.  I did some research and then 
translated a simple adaptive integration routine from Python to 
Lua (rather simple but one has to declare all "local" variables as
local in the recursive functions in Lua-the are local by default
in Python).  Th syntatic differences for my simple case was small.

Some simple timing tests on my Acer Aspire One showed about a factor
of two advantage for Lua.  However, the test was short so it might 
not be valid.  Can't do a valid test on the Nanonote because Lua
is compiled there with single precision floating point whereas Python
only comes in double precision:)  When I set the tolerance to the same
value and run the Lua routine on both the Acer and the Nanonote I see
about a factor of 10 difference in time:  The Acer computes the results
in double precision in 1/10 the time that the Nanonote computes the 
result in single precision.  The number of function evaluations agrees
exactly.  Not bad considering the Acer using IEEE hardware floating point
and the Nanonote uses some "unknown" OpenWRT software floating point:)

Over the next few weeks I'll do some more simple numerical tests to see
how the Nanonote does.  I did not expect it to be fast but for many possible
applications it is fast enough-and that's all we need:)  In fact, considering
the electrical power drawn by the CPU, it does quite well on speed.

There are bindings for Lua and gtk but I don't think they exist in the 
OpenWRT list of packages.  The Python gtk bindings appear to be there 
but are not in the Nanonote image--yet.  However, the Nanonote software
is in its infancy--we should see rather rapid changes over the next 
few months.

                             Delbert Franz




More information about the discussion mailing list


interactive