lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Tony Bauer wrote:
Ralph wrote:

I just allocated a good sized chunk of RAM as a fixed block of
about 58K (yes K) and then used my own malloc/free that operates
on that block, not system memory.

For a mobile phone you may have more RAM available :-)

Ralph


How much can you do in 58K?  I'm very tempted to get a Mindstorm NXT
and try it out (as well as LabView for NXT).  It'd be a breath of
fresh air after dealing with stuff like MDrive Motion Control motors
(nice motor, horrible programming - it doesn't even have structured
if/then) and Animatics SmartMotors (only slightly better) at work.

I'm putting a tutorial together right now for intergating the output
from the HiTechnic Rate Gyro sensor to do absolute positioning using
the LEGO MINDSTORMS NXT and my pbLua, which is stock Lua 5.1.2 with
a custom C runtime library and an interface to the NXT drivers.

I've got other tutorials for parsing raw GPS data from a Bluetooth
GPS receiver, and there's more on the way.

58K does get fragmented in a hurry, but you can do a LOT of useful
robotics in that space.

And it impresses people when I write stuff like:

  fruits = {oranges, bananas, plums, grapes}

  for i,v in ipairs(fruits) do print(i,v) end

and then

  table.sort(fruits)

  for i,v in ipairs(fruits) do print(i,v) end

All working from the terminal window in Eclipse with the NXT actually
compiling and running the code on the fly.

Go on, I dare you to buy an NXT and not have fun.

Cheers, Ralph