SimulationsSimulacionesSIM-0010
Simulate, 5 minutesSimular, 5 minutos
Code the robotPrograme al robot
Build a program from cards and watch the robot follow it exactly. Use a repeat to run the same cards again and again, so a short program can drive a whole square.Arme un programa con tarjetas y vea al robot seguirlo al pie de la letra. Use una repetición para correr las mismas tarjetas una y otra vez, para que un programa corto trace todo un cuadrado.
The drawing shows where it starts. It runs here once its script has loaded.El dibujo muestra dónde empieza. Funciona aquí una vez que carga su código.
Your challengeSu reto
- Get the robot to the star.Lleve el robot hasta la estrella. Not done yet.Todavía no.
- Drive the whole square with five cards or fewer.Trace todo el cuadrado con cinco tarjetas o menos. Not done yet.Todavía no.
- Climb the gem stairs and collect all four gems with five cards or fewer.Suba la escalera y recoja las cuatro gemas con cinco tarjetas o menos. Not done yet.Todavía no.
Every challenge done. Now try it for real at home.Todos los retos logrados. Ahora pruébelo de verdad en casa.
Add a cardAgregue una tarjeta
The programEl programa
Squares movedCasillas avanzadas
Quarter turnsCuartos de vuelta
Angle turned in allÁngulo girado en total
The robot facesEl robot mira hacia
The robot does the cards in order, exactly as written. A green repeat block runs the cards inside it again and again, so a pattern written once can run many times. The arrow marks the card just done; a red card is where it bumped. Each little corner on the path is a right angle.El robot hace las tarjetas en orden, tal como están escritas. Un bloque verde de repetición corre las tarjetas que tiene dentro una y otra vez, así que un patrón escrito una vez puede correr muchas veces. La flecha marca la tarjeta que acaba de hacer; una tarjeta roja es donde chocó. Cada esquinita en el camino es un ángulo recto.
What is happeningQué está pasando
A program is a list of exact instructions, and a robot follows them literally. It only knows what it was told, not what we meant.Un programa es una lista de instrucciones exactas, y un robot las sigue al pie de la letra. Solo sabe lo que se le dijo, no lo que quisimos decir.
A loop repeats the cards inside it. A square is one side and one turn, four times over, so instead of sixteen cards you can write the side and the turn once and put them inside a repeat that runs four times: five cards in all. Finding the pattern that repeats is the heart of a loop.Un ciclo repite las tarjetas que tiene dentro. Un cuadrado es un lado y un giro, cuatro veces, así que en lugar de dieciséis tarjetas puede escribir el lado y el giro una sola vez y ponerlos dentro de una repetición que corra cuatro veces: cinco tarjetas en total. Encontrar el patrón que se repite es el corazón de un ciclo.
A quarter turn is a right angle. Two make a half turn and four make a full turn, so a square has four equal sides and four right angles, and the robot ends facing the way it began.Un cuarto de vuelta es un ángulo recto. Dos hacen media vuelta y cuatro una vuelta completa, así que un cuadrado tiene cuatro lados iguales y cuatro ángulos rectos, y el robot termina mirando hacia donde empezó.
Debugging is watching: step through one card at a time, see where the robot goes wrong, and fix that card.Depurar es observar: avance una tarjeta a la vez, vea dónde se equivoca el robot y arregle esa tarjeta.
Things to tryCosas para probar
- Drive the square without a repeat and count the cards, then drive it again with one.Trace el cuadrado sin repetición y cuente las tarjetas; luego trácelo otra vez con una.
- Change how many times the repeat runs and watch where the robot ends up.Cambie cuántas veces corre la repetición y vea dónde termina el robot.
- Make the robot bump on purpose, then step through and fix the card that failed.Haga chocar al robot a propósito, luego avance paso a paso y arregle la tarjeta que falló.
- Watch the turns under the grid: how many quarter turns make a full turn?Mire los giros debajo de la cuadrícula: ¿cuántos cuartos de vuelta hacen una vuelta completa?
This robot moves exactly one square and turns exactly a quarter turn every time, and its repeats do not go one inside another. A real robot drifts and slips, so its distance and its turns have to be measured and adjusted.Este robot avanza exactamente una casilla y gira exactamente un cuarto de vuelta cada vez, y sus repeticiones no van una dentro de otra. Un robot real se desvía y resbala, así que hay que medir y ajustar su distancia y sus giros.
Use it, share it, adapt itÚsela, compártala, adáptela
The credit to copyEl crédito para copiar
Free BYRD, CC BY. “Code the robot” from the Byrd Academy STEM Curriculum by Byrd EDU, byrdathome.org.Free BYRD, CC BY. “Programe al robot”, del Currículo STEM de Byrd Academy, de Byrd EDU, byrdathome.org.
This is free to use, share and adapt, even commercially, under the Creative Commons Attribution 4.0 International license (CC BY 4.0), with this credit. What Free BYRD means.Esto es libre de usar, compartir y adaptar, incluso con fines comerciales, bajo la licencia Creative Commons Atribución 4.0 Internacional (CC BY 4.0), con este crédito. Qué significa Free BYRD.