ExploreExplorarBH-0035

BH-0035

Be the microcontroller: run a blink program with a flashlightSea el microcontrolador: ejecute un programa de parpadeo con una linterna

Plan a blink pattern on pseudocode cards with a delay variable, have a family member run it with a flashlight, change the variable, add a button, and tell one honest bug story.Planee un patrón de parpadeo en tarjetas de pseudocódigo con una variable de espera, pida a un familiar que lo ejecute con una linterna, cambie la variable, agregue un botón y cuente una historia honesta de un error.

  • Ways in:Formas de empezar:
  • Read, 3 minutesLeer, 3 minutos
  • Do, 30 minutesHacer, 30 minutos
  • Simulate, 5 minutesSimular, 5 minutos
AgesEdades
Every age. Best for ages 10 and up.Todas las edades. Ideal desde los 10 años.
CostCosto
Things already at homeCosas que ya hay en casa
From the curriculumDel currículo
STEM-JH-01

The MESH'D components this item uses:Los componentes MESH'D que usa:ElectronicsElectrónicaSoftwareSoftware

Do, about 30 minutesHacer, unos 30 minutos

Build it at homeConstrúyalo en casa

StepsPasos

  1. Tour the board on paper: draw a box with one output, the light, and one input, the button.Recorra la placa en papel: dibuje una caja con una salida, la luz, y una entrada, el botón.
  2. Write the first program on cards: light on; wait delay; light off; wait delay; repeat. Write delay equals one second on its own card.Escriba el primer programa en tarjetas: luz encendida; esperar la espera; luz apagada; esperar la espera; repetir. Escriba espera igual a un segundo en su propia tarjeta.
  3. Hand the cards to the runner. They do exactly what each card says with the flashlight while you count the seconds.Entregue las tarjetas a quien ejecuta. Esa persona hace exactamente lo que dice cada tarjeta con la linterna mientras usted cuenta los segundos.
  4. Change the variable: cross out one second and write half a second. Run again and say what happened.Cambie la variable: tache un segundo y escriba medio segundo. Ejecute otra vez y diga qué pasó.
  5. Add a button: the sticky note on the table. New card: if the button is pressed, then delay equals a quarter second. Press and release it during the run.Agregue un botón: la nota adhesiva sobre la mesa. Tarjeta nueva: si el botón está presionado, entonces espera igual a un cuarto de segundo. Presiónelo y suéltelo durante la ejecución.
  6. Design your own sequence with a loop: repeat three times, short, short, long.Diseñe su propia secuencia con un bucle: repetir tres veces, corto, corto, largo.
  7. Start a build log: a sketch of the program and one honest bug story, such as a card out of order or a runner who guessed.Empiece una bitácora de construcción: un boceto del programa y una historia honesta de un error, como una tarjeta fuera de orden o alguien que adivinó en vez de leer.
  8. Walk a family member through the code while it runs.Explique el código paso a paso a un familiar mientras se ejecuta.

What you needLo que necesita

  • A flashlight, or a phone's light held by a grown-upUna linterna, o la luz de un teléfono en manos de una persona adulta
  • Index cards and a pencil for the pseudocodeTarjetas y un lápiz para el pseudocódigo
  • A clock or a timer that shows secondsUn reloj o un cronómetro que muestre segundos
  • A sticky note marked buttonUna nota adhesiva marcada botón

Things already at home.Cosas que ya hay en casa.

A flashlight is the only light here: no wall-outlet wiring, ever, and nothing is opened. If your family later uses a real board, it stays at low voltage, twelve volts or less, powered by the board or by batteries, and power is disconnected before any wiring changes. Flashlight batteries stay inside the flashlight, and children never handle button or coin batteries. Do not shine the light in anyone's eyes.Una linterna es la única luz aquí: nunca el cableado de un tomacorriente, jamás, y nada se abre. Si su familia usa después una placa real, se mantiene a bajo voltaje, doce voltios o menos, con la energía de la placa o de pilas, y se desconecta la energía antes de cambiar cualquier conexión. Las pilas de la linterna se quedan dentro de la linterna, y los niños nunca manejan pilas de botón ni de moneda. No apunte la luz a los ojos de nadie.

Read, 3 minutesLeer, 3 minutos

The big ideaLa gran idea

A microcontroller is a small computer that runs one list of instructions over and over, and the first program anyone writes makes a light blink. Code is not memorized spells: it is a list you can read line by line and change. A variable stops being a letter from math class and becomes a named value; change the delay and the blink you see changes, and one thousand milliseconds make one second. A loop repeats a block, and a button is a decision: the program reads it, decides, and acts. When something fails, the board is almost never broken. The bug lives in the code or the wiring, so read the message, check one thing at a time, and tell the story without embarrassment.Un microcontrolador es una computadora pequeña que ejecuta una lista de instrucciones una y otra vez, y el primer programa que cualquiera escribe hace parpadear una luz. El código no son hechizos memorizados: es una lista que se puede leer línea por línea y cambiar. Una variable deja de ser una letra de la clase de matemáticas y se vuelve un valor con nombre; cambie la espera y el parpadeo que ve cambia, y mil milisegundos hacen un segundo. Un bucle repite un bloque, y un botón es una decisión: el programa lo lee, decide y actúa. Cuando algo falla, la placa casi nunca está rota. El error vive en el código o en las conexiones, así que lea el mensaje, revise una cosa a la vez y cuente la historia sin vergüenza.

Simulate, 5 minutesSimular, 5 minutos

Wire a circuitConecte un circuito

Lay wires between a battery, an LED, a resistor, a switch and a gap. Make a full loop and the LED lights; leave a break anywhere and nothing flows.Ponga cables entre una pila, un LED, una resistencia, un interruptor y un hueco. Haga un circuito completo y el LED se enciende; deje una interrupción en cualquier lugar y nada fluye.

A circuit board with a coin cell in its holder, a banded resistor, a dark LED, an open knife switch and a paper clip across a gap between two copper pads, two wires laid.

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

  1. Finish the loop so the LED lights.Complete el circuito para que el LED se encienda. Not done yet.Todavía no.
  2. Make it shine bright but safe: between fifteen and twenty-five milliamps through the LED.Hágalo brillar fuerte pero sin riesgo: entre quince y veinticinco miliamperios por el LED. Not done yet.Todavía no.
  3. Make one big loop through every part, the resistor, the LED, the switch and the gap, so the switch turns the light on and off.Haga un solo circuito grande que pase por todas las partes, la resistencia, el LED, el interruptor y el hueco, para que el interruptor encienda y apague la luz. 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.

The batteryLa pila
What bridges the gapQué une el hueco

Lay a wire: pick one end, then anotherPonga un cable: elija un extremo y luego otro

BatteryPila

LEDLED

ResistorResistencia

SwitchInterruptor

The gapEl hueco

Wires laidCables puestos

    Current through the LEDCorriente que pasa por el LED

    Current out of the battery, and back into itCorriente que sale de la pila, y que regresa a ella

    Tap two ends on the board, or drag from one to another, to lay a wire; tap the switch to flip it. The dots are the moving charge and the arrows its way: out of the plus side, around the loop, back into the minus side. The bar fills at what a small LED is made for.Toque dos extremos en la tablilla, o arrastre de uno a otro, para poner un cable; toque el interruptor para moverlo. Los puntos son la carga en movimiento y las flechas su camino: sale del lado positivo, da la vuelta al circuito y regresa por el lado negativo. La barra se llena con lo que aguanta un LED pequeño.

    What is happeningQué está pasando

    Electricity flows only around a complete loop: out of the battery’s plus side, through every part, and back into its minus side. Break the loop anywhere, with an open switch or an empty gap, and it all stops.La electricidad solo fluye por un circuito completo: sale por el lado positivo de la pila, pasa por cada parte y vuelve por su lado negativo. Si el circuito se rompe en cualquier lugar, con un interruptor abierto o un hueco vacío, todo se detiene.

    Metal carries electricity and rubber does not, so a paper clip can close a gap and a rubber band cannot. An LED is a one way valve: it lights only with its long leg toward the plus side.El metal conduce la electricidad y la goma no, así que un clip puede cerrar un hueco y una liga no. Un LED es una válvula de un solo sentido: solo se enciende con su pata larga hacia el lado positivo.

    Nothing is used up in the wire: the same current that leaves the battery comes back to it, which is why the board shows the same number at both ends of the battery. What the light uses is the energy the battery supplies.Nada se gasta en el cable: la misma corriente que sale de la pila vuelve a ella, por eso la tablilla muestra el mismo número en los dos lados de la pila. Lo que usa la luz es la energía que da la pila.

    A resistor holds the current down so the LED is not pushed too hard. Two AA cells push with the same three volts as one coin cell, so through the same resistor the light is about as bright: a bigger battery lasts longer, it does not push harder.Una resistencia frena la corriente para que el LED no se fuerce demasiado. Dos pilas AA empujan con los mismos tres voltios que una pila de botón, así que con la misma resistencia la luz brilla casi igual: una pila más grande dura más, no empuja más fuerte.

    Things to tryCosas para probar

    • Lay the last wire to finish the loop, then turn the LED around. Does it still light?Ponga el último cable para completar el circuito y luego voltee el LED. ¿Todavía se enciende?
    • Run the loop through the gap and bridge it with the paper clip, then the rubber band, then nothing. Which ones are conductors?Pase el circuito por el hueco y únalo con el clip, luego con la liga, luego con nada. ¿Cuáles son conductores?
    • Take the resistor out with the two AA cells and read the warning, then find the resistor that keeps the LED bright but safe.Quite la resistencia con las dos pilas AA y lea la advertencia; luego busque la resistencia que deja el LED brillante pero sin riesgo.
    • Join the battery’s plus and minus sides with one wire and watch where the current goes. Never do this with a real battery.Una el lado positivo y el negativo de la pila con un solo cable y vea por dónde se va la corriente. Nunca lo haga con una pila de verdad.

    The numbers come from a simple model of fresh batteries, a red LED and ideal wires; real cells sag as they tire, a coin cell most of all, and LEDs differ by color and part. Real coin cells are a swallowing danger: a grown-up counts them out and back, and keeps them far from young children.Los números vienen de un modelo sencillo de pilas nuevas, un LED rojo y cables ideales; las pilas reales se debilitan al cansarse, sobre todo la de botón, y los LED varían según el color y la pieza. Las pilas de botón reales son un peligro si se tragan: una persona adulta las cuenta al sacarlas y al guardarlas, y las mantiene lejos de los niños pequeños.

    Open the simulation on its own pageAbrir la simulación en su propia página

    Your engineering challengeSu reto de ingeniería

    Write a program the flashlight runner can execute with no questions asked, blinking a pattern with a loop and a delay variable, then change one number to make the pattern twice as slow.Escriba un programa que quien tiene la linterna pueda ejecutar sin hacer preguntas, con un patrón de parpadeo hecho con un bucle y una variable de espera, y luego cambie un solo número para que el patrón sea el doble de lento.

    Make it an experimentConviértalo en un experimento

    Science is about changing one thing and watching what happens. Write down your guess, your hypothesis, before you start.La ciencia se trata de cambiar una cosa y observar qué pasa. Escriba su suposición, su hipótesis, antes de empezar.

    • Change only the delay variable, half a second, one second, two seconds. Time ten blinks with a clock and compare.Cambie solo la variable de espera: medio segundo, un segundo, dos segundos. Cronometre diez parpadeos con un reloj y compare.
    • Same program, two different runners. Do they run it the same? Where the runs differ, the program was unclear: fix the cards.El mismo programa con dos personas distintas ejecutándolo. ¿Lo hacen igual? Donde las ejecuciones difieran, el programa no estaba claro: corrija las tarjetas.
    • Add a button rule, if pressed then blink fast, and test it pressed and not pressed.Agregue una regla de botón, si está presionado entonces parpadea rápido, y pruébela presionado y sin presionar.

    Use it, share it, adapt itÚsela, compártala, adáptela

    The credit to copyEl crédito para copiar

    Free BYRD, CC BY. “Be the microcontroller: run a blink program with a flashlight” from the Byrd Academy STEM Curriculum by Byrd EDU, byrdathome.org.Free BYRD, CC BY. “Sea el microcontrolador: ejecute un programa de parpadeo con una linterna”, 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.

    Keep goingSiga adelante

    What to do nextQué hacer después

    Make it harderHágalo más difícil

    Write the same program the way a real board would read it: setup once, loop forever, a variable named delay, and an if for the button. Then add a second light and make the two alternate.Escriba el mismo programa como lo leería una placa real: configuración una vez, bucle para siempre, una variable llamada espera y un si para el botón. Luego agregue una segunda luz y haga que las dos se alternen.

    For a younger onePara alguien más pequeño

    The younger one holds the flashlight and runs a two-card program, on and off, while the grown-up counts. Change the count and watch the blink get slow or fast.La niña o el niño sostiene la linterna y ejecuta un programa de dos tarjetas, encender y apagar, mientras la persona adulta cuenta. Cambie la cuenta y observe cómo el parpadeo se hace lento o rápido.

    Try this nextPruebe esto después

    SIM-0006

    Wire a circuitConecte un circuito

    Lay wires between a battery, an LED, a resistor, a switch and a gap. Make a full loop and the LED lights; leave a break anywhere and nothing flows.Ponga cables entre una pila, un LED, una resistencia, un interruptor y un hueco. Haga un circuito completo y el LED se enciende; deje una interrupción en cualquier lugar y nada fluye.

    • Ways in:Formas de empezar:
    • SimulateSimular

    Best for ages 8 and upIdeal desde los 8 años

    ElectronicsElectrónica

    Free BYRD, CC BYSimulationSimulación

    TOUR-0001

    Inside a circuit, from the wall outlet to the chipDentro de un circuito, del tomacorriente al chip

    Follow electricity from the outlet on your wall, through the wires and a phone charger, onto a circuit board and into a chip, where billions of tiny switches turn on and off.Siga la electricidad desde el tomacorriente de su pared, por los cables y un cargador de teléfono, hasta una placa de circuito y dentro de un chip, donde miles de millones de interruptores diminutos se encienden y se apagan.

    • Ways in:Formas de empezar:
    • TourRecorrer

    Best for ages 8 and upIdeal desde los 8 años

    ElectronicsElectrónica

    Free BYRD, CC BYVirtual tourRecorrido virtual

    BH-0011

    Light up a paper circuit cardIlumine una tarjeta con un circuito de papel

    Lay copper tape on a card, add an LED and a coin cell, and fold the corner to close the loop and make it light.Ponga cinta de cobre en una tarjeta, agregue un LED y una pila de botón, y doble la esquina para cerrar el circuito y encender la luz.

    • Ways in:Formas de empezar:
    • ReadLeer
    • DoHacer
    • SimulateSimular

    Best for ages 8 and upIdeal desde los 8 años

    ManufacturingManufacturaElectronicsElectrónica

    Free BYRD, CC BYHome activityActividad en casa

    BH-0022

    Program a grown-up on a floor gridPrograme a una persona adulta en una cuadrícula en el piso

    Tape a grid on the floor, write exact instructions on cards, and watch a grown-up robot follow them to the letter, mistakes and all.Haga una cuadrícula con cinta en el piso, escriba instrucciones exactas en tarjetas y vea a un robot adulto seguirlas al pie de la letra, errores incluidos.

    • Ways in:Formas de empezar:
    • ReadLeer
    • DoHacer
    • SimulateSimular

    Best for ages 5 to 12Ideal de 5 a 12 años

    SoftwareSoftware

    Free BYRD, CC BYHome activityActividad en casa

    Explore everythingExplorar todo