Activities/Butialo

From Sugar Labs
< Activities
Revision as of 20:44, 30 September 2012 by Tonyforster (talk | contribs) (Created page with "Butialo is a user-friendly environment that allows programming of the Butiá in the Lua language. Lua is a simple imperative scripting language but can create sophisticated p...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Butialo is a user-friendly environment that allows programming of the Butiá in the Lua language. Lua is a simple imperative scripting language but can create sophisticated programs. It is a dynamic language with automatic memory management and is extremely fast. Butialo is a derivative of the Pippy IDE (Python environment provided with the XO), which simplifies the creation of programs for the presence of components connected to the Butiá and offering snippets of code to access them.

The authoritative documentation is in the Spanish language at [1]

Installation

Download the Activity at [2]

Simple example

Move forward until there is an obstacle.

Motores.setvel2mtr( 1, 500, 1, 500 )
while true do
  local dist = Dist.getDistancia()
  if dist<700 then
     Motores.setvel2mtr( 1, 0, 1, 0 )
     repeat
        wait(1)
        dist = Dist.getDistancia()
     until dist > 700
     Motores.setvel2mtr( 1, 500, 1, 500 )
  end
end