Activities/Butialo: Difference between revisions
Tonyforster (talk | contribs) |
Tonyforster (talk | contribs) |
||
| Line 39: | Line 39: | ||
Butia with dynamic stability. Take a Butiá, remove idler wheels and place an IR distance sensor pointing to the floor. The button toggles the behavior. | Butia with dynamic stability. Take a Butiá, remove idler wheels and place an IR distance sensor pointing to the floor. The button toggles the behavior. | ||
local d | local d --measured distance | ||
local eq -- | local eq --equilibrium position of d | ||
local v | local v --calculated velocity | ||
while true do | while true do | ||
print (" | print ("Press the button to start") | ||
repeat until Boton.getBoton()==1 | repeat until Boton.getBoton()==1 | ||
eq = Dist.getDistancia() | eq = Dist.getDistancia() | ||
print(" | print("Starting", eq) | ||
util.wait(1) | util.wait(1) | ||
| Line 63: | Line 63: | ||
until Boton.getBoton()==1 | until Boton.getBoton()==1 | ||
print(" | print("Finished") | ||
Motores.setvel2mtr(1, 0, 1, 0) | Motores.setvel2mtr(1, 0, 1, 0) | ||
util.wait(1) | util.wait(1) | ||
end | end | ||
<iframe width="640" height="360" src="http://www.youtube.com/embed/3A0-Jmpk3c0?feature=player_embedded" frameborder="0" allowfullscreen></iframe> | |||
==Continue reading in Spanish== | ==Continue reading in Spanish== | ||
[http://www.fing.edu.uy/inco/proyectos/butia/mediawiki/index.php/Butialo] | [http://www.fing.edu.uy/inco/proyectos/butia/mediawiki/index.php/Butialo] | ||