Back to your course / CR2-S01
Computing and Robotics · 2.º ESO · Learn
Automating our classroom
Automation connects a need, inputs, decisions and a response. You will learn to justify each part and recognise what a test actually demonstrates.
Your mission
Design and build automatic lighting or ventilation control in a low-voltage model: two inputs, a combined condition, an output and manual mode. Keep the diagram, block code, readings table and tests. The guided improvement explores two thresholds.

Read the explanation, study the diagram and try the activity in each section. You can choose another version at any time.
Your tools
Use Google Docs for written explanations and diagrams.net for diagrams. Save the editable file as well as the evidence requested in each task.
1.1. Automation starts by deciding what to control
Learn · theory and practice
Automation means preparing rules so that a system responds to inputs without a human command for every action. First define the need: which situation we want to recognise, which response would help and when it would be unnecessary. A requirement turns an intention such as ‘improve the classroom’ into testable behaviour. It must state conditions, response and scope. Our model represents a classroom need, but it does not modify the electrical installation or demonstrate energy savings by itself.
Manual control depends on a direct command; automatic control interprets inputs. Both can coexist if their priority is defined. An override must prevent the output even when the automatic rule requests activation. The system must also communicate whether it is enabled: permission to operate and a sensor alert are different information. Usefulness is justified by comparing the model with and without automation, considering reused materials and avoided actions. Claiming measured savings would require measuring consumption under comparable conditions.
- Need
- Testable requirement
- Control rule
- Useful response
A cardboard display case needs to indicate when its lighting should be checked. The team proposes showing a signal only during demonstration hours. The light reading describes a condition; enabling expresses whether that condition should be acted on. A case closed to visitors may be dark without needing an alert. The requirement must distinguish both cases before components are chosen.
- In Google Docs, write a need and two testable requirements for a model.
- In diagrams.net, represent input, decision, output and manual command.
- In Google Docs, explain an unnecessary action and a resource you could reuse.
How does demonstrating a useful response differ from demonstrating electricity savings?
1.2. Two inputs and a combined condition
Learn · theory and practice
Inputs carry information with different meanings: a measurement describes a situation, while a command expresses a choice. In our model, integrated light sensing provides a number and a button produces an event. Understanding that difference requires separating the physical quantity from its representation. An analogue signal can vary continuously; a digital signal distinguishes discrete states. A converter represents analogue values as digital numbers. A comparison then turns a reading into a Boolean condition, whose result can only be true or false.
These conditions form the control rule. AND requires both to be true, whereas OR accepts at least one being true. Changing the operator therefore changes the response even when the inputs and wiring stay the same. A truth table brings together the four possible combinations of two conditions and helps check the difference each rule makes. Its value lies in relating each combination to the requirement the system must meet.
Operation also depends on what is remembered between readings. A brief press can change the Boolean variable habilitado and preserve the choice after the button is released. While events change this enabling state, the loop measures again and consults the retained permission to decide. Reinitialising the variable inside the loop would break that continuity: the next cycle would overwrite the choice. Measurement, condition and memory therefore work together to produce a consistent response.
- Button event
- Stored enabling
- AND with condition
- Output request
A display produces a signal when its lid is closed and a demonstration is enabled. If the lid is open, enabling the demonstration is insufficient. A table combining open or closed lid with active or inactive permission reveals the difference. With OR, permission alone could request the signal. This comparison explains the error without changing wires.
Condicionales – MakeCode – micro:bit
Watch in short sections. Connect one explanation with the diagram and try the example in this section. The written theory lets you complete the activity without playing the video.
The video keeps its original spoken language. Use the captions available in the player if they help.
- In Google Docs, create the four-combination table for your rule.
- In MakeCode, create the enabled variable and two events that change it.
- In MakeCode, test a case distinguishing AND from OR and record the result in Google Docs.
Why can a brief button press enable a system for several cycles?
1.3. Measure before choosing a threshold
Learn · theory and practice
A threshold is a reference against which we compare a reading to make a decision. Choose it from observations, not because a number is convenient. In MakeCode, micro:bit’s integrated light sensing uses a relative scale from 0 to 255: larger numbers represent more light. These are not lux. The first call starts sensing and returns 0; start the reading and allow it to update before collecting the useful observation series.
Collect five readings per condition, keeping position, orientation and procedure consistent. Record the scale and origin of the data, including when an external module is used. Two devices may show the same number with different meanings or reverse the direction of response. If series overlap, one boundary cannot separate them perfectly. Revising placement or describing uncertainty is more honest than deleting values. This characterisation relates the reading to the observed situation; it does not automatically turn the relative scale into a calibrated physical unit.
- Known condition
- Repeated readings
- Series comparison
- Justified threshold
Two positions in a model produce hypothetical readings of 70, 74, 72, 71 and 73 versus 68, 71, 69, 72 and 70. They share several values: no threshold can always distinguish them. Changing sensor orientation might improve separation, but both series would need collecting again. The numbers illustrate reasoning; they are not measurements made in your classroom.

Sensores básicos: nivel de luz. Ejercicios con Rodrigo.
Watch in short sections. Connect one explanation with the diagram and try the example in this section. The written theory lets you complete the activity without playing the video.
The video keeps its original spoken language. Use the captions available in the player if they help.
- In MakeCode, start sensing and observe its update before recording data.
- Using the board, collect five readings per condition and record origin, scale, position and orientation in Google Docs.
- In Google Docs, justify a threshold or explain why the series do not support a clear choice.
What information is missing if a table only says ‘light: 50’?
1.4. Avoid unstable responses
Learn · theory and practice
A reading can fluctuate slightly even when the observed situation seems stable. With a single threshold, a small variation can put it on one side of the boundary and then the other. If every crossing requires switching on or off, the alert changes repeatedly without a substantial change in the surroundings. Hysteresis reduces this instability by using one limit for activation and another for deactivation. In the workshop, the alert activates with light below 45 and deactivates with light above 55; these are relative-scale references, not universal illumination values.
Separating the limits creates a region in which the previous state is retained. Knowing only the current reading therefore does not always predict the output: the alert’s previous state and the program’s starting state also matter. The workshop comparisons are strict. A reading exactly equal to 45 or 55 does not meet the condition for a change and preserves memory. The previous state is part of the decision, rather than an incidental item in the record.
This relationship explains why checking requires sequences from both initial states. An isolated reading does not show which transition occurred. Hysteresis changes the conditions for switching; averaging combines readings, while waiting delays actions. These are different approaches. The guided improvement explores fewer changes near the threshold, but it neither makes an unsuitable sensor suitable nor eliminates every disturbance.
- Current reading
- Transition limits
- Previous state
- Retained or new state
A different alert activates below 30 and deactivates above 40. Two tests reach 35: one was active and the other inactive. Both keep their situation despite receiving the same reading. There is no contradiction: the rule includes memory. To check this, prepare two sequences with different starting states instead of testing 35 just once.
- In MakeCode, compare a one-threshold copy with the guided improvement using 45 and 55.
- In Google Docs, prepare sequences including 45 and 55 from both states.
- In Google Docs, record reading, previous state and new state after every tested step.
Why does testing an isolated value fail to demonstrate hysteresis?
1.5. Act and protect the assembly
Learn · theory and practice
A controller interprets inputs and generates commands; an actuator turns a command into a physical effect. An LED can communicate and a servo can move a part. The signal expressing a decision is different from the power supply providing energy. A signal pin must not be used as a direct power source for a motor. The validated interface adapts the command to the component and may require a specific supply, according to its documentation and authorised assembly.
Separating the decision from applying the output preserves the logic when replacing the LED matrix with a compatible indicator. The alert variable expresses intention; the output block translates it. Some modules activate at different logical levels: active polarity must be checked. micro:bit, ACEBOTT and Echidna Black2 can be studied as stations with similar functions without assuming interchangeable wires, voltages or programs. Record board, module reference, voltage, signal, connector and environment; connect with power off and use only the diagram reviewed with the teacher.
- Logical decision
- Compatible interface
- Powered actuator
- Physical effect
The program reports alert true, but the external indicator stays off. Before changing the threshold, the team observes the integrated matrix and checks the interface sheet. The decision may be correct while its translation is reversed. Testing the output separately with the validated assembly distinguishes a signal problem from a logic problem without changing several parts at once.
8. Cómo CONECTAR SENSORES a la MICROBIT y PROGRAMARLOS | Curso de ROBÓTICA para NIÑOS
Watch in short sections. Connect one explanation with the diagram and try the example in this section. The written theory lets you complete the activity without playing the video.
The video keeps its original spoken language. Use the captions available in the player if they help.
- In Google Docs, complete the board, module, supply, signal, connector and environment sheet.
- In diagrams.net, separate information flow from power supply according to the validated assembly.
- In MakeCode, test the output separately before integrating it with the decision.
Which part can stay and which must be checked when changing actuators?
1.6. Design the response to faults
Learn · theory and practice
A design must state what happens at startup, override and re-enabling. For this model, the output starts inactive and override prevents later automatic requests until enabling again. In the guided improvement, B disables the system and sets alert false; A allows the current reading to be interpreted again. If the reading lies between thresholds, the state left by override matters. Adding a button is insufficient if the loop immediately activates the output again.
The response to a lost input depends on what the program can actually recognise. An in-range number may come from a stuck sensor; checking the interval alone does not detect that problem. Record symptom, hypothesis and a test to investigate it. This model adopts an inactive output for the anticipated fault, without claiming that switching off is always safe in every system. Test override while the automatic rule is requesting action: pressing stop when everything is already off provides little evidence of its priority.
- Override
- Permission disabled
- Automatic rule blocked
- Output inactive
A signal disappears when the button is pressed but returns in the next cycle. The button works; the hypothesis is that the loop does not check enabling. The team displays that variable and repeats the test while the input still requests an alert. This separates a received event from a respected priority. Diagnosis depends on the sequence, not a final screenshot.
- In Google Docs, define startup, override, re-enabling and response to the anticipated fault.
- In MakeCode, test B with an active alert and then A with an intermediate reading.
- In Google Docs, record a symptom, a hypothesis and a test that can distinguish it from another cause.
How does receiving a button press differ from preserving its priority in later cycles?
1.7. Laboratory, project and two assignments
Learn · theory and practice
Integration means checking that the parts cooperate according to the requirements. First read inputs; then determine the new state; finally apply a consistent output. A trace records that path cycle by cycle, including reading, enabling, previous state and new state. Simulation controls values and explores boundaries, but it does not demonstrate wiring, real sensor response or power supply. Physical verification requires the validated assembly and a record identifying its test conditions.
Design assignment A01 brings together requirements, diagram, algorithm, resources and an already completed micro-test; it is more than a promise to build. Product assignment A02 includes editable code, assembly, tests and an evidenced improvement. Intermediate practice contributes to these two assignments without creating another. To compare an improvement, keep conditions consistent and change one decision at a time. Record unexpected results too and limit conclusions to observations. Each partner must trace data to an effect and explain a personal decision, prediction and concrete modification or review.
- A01 design
- Micro-test
- Integration
- Comparable test
- A02 improvement
A pair tests the same controller in simulation and on the board. In simulation they enter a clean jump between values; covering the real sensor produces gradual variation. The results do not contradict each other: the inputs differed. They keep both records and add physical conditions. To compare versions they will repeat a similar procedure without presenting simulated values as classroom measurements.
- In diagrams.net, review the full cycle and its priorities before integrating it in MakeCode.
- In Google Docs, separately record simulated and physical tests with expected result, observation and conclusion.
- Export editable code from MakeCode and include an evidenced improvement in the Google Docs dossier.
Which claim about your assembly cannot be supported by simulation?
1.8. Explore further at your own pace
Learn · theory and practice
Technical documentation answers a specific question. The lightLevel reference explains range and first reading; the safety guide supports checking board handling. A tutorial may demonstrate an application, but its decisions do not replace your requirements or guarantee compatibility. Before adapting an example, identify version, input, output, conditions and expected result. This turns a recipe into an explanation you can defend in a different situation.
Transfer preserves a pattern while reviewing context-dependent details. Changing from light to another sensor might preserve read, decide and act, but require checking scale, reading direction, thresholds and interface. Replacing an icon with a motor also changes resources and physical response. Optional videos can be paused and supported by text; they are not required to complete the mission. In Google Docs, record which question each source answers and what remains untested. Use compatible permissions and attribution for external resources, without confusing citation with permission to reproduce them.
- Technical question
- Version-specific source
- Reusable pattern
- New verification
A tutorial uses an external sensor while our project uses integrated light sensing. The team keeps the read, compare and alert diagram but does not copy its threshold. They check scales and collect their own observations. Their record explains the reused pattern and the details reviewed. This adaptation demonstrates understanding even if the new program uses fewer blocks than the original example.
- Consult the official light reference and safety guide linked in sources.
- In Google Docs, record a question answered by each resource and a remaining limitation.
- In diagrams.net, show how you would adapt the controller to another input without making new connections.
What would you keep from the algorithm and check before changing sensors?
Your project and submissions
A01 · Design the solution
- Create CR2-S01_automatizacion_A01_Apellidos in Google Docs with need, audience and testable requirements.
- In diagrams.net, draw two inputs, controller, output and supply according to the validated sheet.
- In Google Docs, describe algorithm, combined condition, initial state, boundary equality and manual priority.
- Run a reading or control micro-test in MakeCode and the validated assembly; identify simulated and physical parts.
- Add resources, sources, permissions, justified savings or reuse and each partner’s contribution.
What to submit
- Google Docs dossier with inserted diagram and combinations or states table.
- Editable microprogram, documented physical reading and result compared with prediction.
- Individual explanation of a decision and its relation to the need.
A02 · Automatic lighting or ventilation control in a model
- Build the revised low-voltage design and program automatic mode, manual mode and state indication in MakeCode.
- Test all four low/high-light and enabled/disabled combinations; record expected and observed results.
- For the guided improvement, test 44, 50 and 56 and boundaries 45 and 55 from both states; test B during an active alert.
- Record a fault, change one decision and repeat the test to assess the improvement.
- Submit the CR2-S01_automatizacion folder with editable code, diagram, instructions, readings table, identified physical or simulated tests, sources and individual explanation.
What to submit
- Assembly connecting two inputs and one output to the need.
- Editable code and traces that verify boundaries, memory and override.
- Record of conditions, results, repair and compared improvement; individual explanation or modification.
Before you submit
- I explain the data path without confusing reading, condition and output.
- I justify a threshold with observations and name its scale correctly.
- I predict boundaries and sequences using the previous state.
- I demonstrate override while automatic control requests action.
- I distinguish physical tests from simulation and explain an improvement with evidence.
Templates and files
Open the blank A01 or A02 template and make your own copy in Google Docs. Keep the editable file from your project platform as well.
These reusable templates help you organise your work. Follow the specific instructions and evidence list for this unit; remove fields that do not apply. The blank master is read-only. Keep your answers private and share them only as your teacher instructs.
A01 · Design the solution
Make your own copy in Google Docs · View the blank template
- Google Docs dossier with inserted diagram and combinations or states table.
- Editable microprogram, documented physical reading and result compared with prediction.
- Individual explanation of a decision and its relation to the need.
A02 · Automatic lighting or ventilation control in a model
Make your own copy in Google Docs · View the blank template
- Assembly connecting two inputs and one output to the need.
- Editable code and traces that verify boundaries, memory and override.
- Record of conditions, results, repair and compared improvement; individual explanation or modification.
Classroom rubrics
The classroom assessment reference is preserved below in its original Spanish. Use the checklist above to prepare your work and ask your teacher about any descriptor you need to clarify.
Consultar la rúbrica de A01
Diseño y microprueba
CYR.2.1.1 Recorrido físico y características de las señales
Comprender el funcionamiento de los sistemas de computación física, sus componentes y principales características.
Evidencia. Esquema de dos entradas y una salida, ficha validada y microensayo de lectura.
| Banda | Desempeño observable |
|---|---|
| 1–2,9 | Confunde alimentación y señal o no identifica qué componente aporta cada dato. |
| 3–4,9 | Reconoce componentes, pero omite la referencia de conexión o confunde medida analógica y decisión digital. |
| 5–6,9 | Relaciona entradas, controlador y salida, distingue señal analógica y digital y demuestra una lectura física documentada con el montaje validado. |
| 7–8,9 | Compara valores en dos condiciones y relaciona variación de lectura y decisión sin atribuir unidades no calibradas. |
| 9–10,0 | Justifica sustituir una entrada por otra e identifica las comprobaciones de señal e interfaz que serían necesarias. |
CYR.2.1.3 Condiciones combinadas y memoria del control
Entender cómo funciona un programa informático, la manera de elaborarlo y sus principales componentes.
Evidencia. Algoritmo, tabla de verdad o estados y microprograma ejecutado.
| Banda | Desempeño observable |
|---|---|
| 1–2,9 | Las condiciones permiten activar y desactivar a la vez sin reconocer la contradicción. |
| 3–4,9 | Distingue entradas, pero confunde Y con O o no define qué ocurre en los límites. |
| 5–6,9 | Explica variables, condiciones combinadas y repetición en un microprograma. Define igualdad, modo manual y estado inicial y contrasta un caso. |
| 7–8,9 | Traza la banda de histéresis y explica por qué un mismo valor conserva estados anteriores distintos. |
| 9–10,0 | Modifica límites o prioridad y predice los casos afectados antes de ejecutar una secuencia nueva. |
CYR.2.2.1 Problema automatizable y procedimiento compartido
Conocer y resolver la variedad de problemas posibles, desarrollando un programa informático y generalizando las soluciones, tanto de forma individual como trabajando en equipo, colaborando y comunicándose de forma adecuada.
Evidencia. Requisitos, algoritmo y microprueba con aportaciones identificables.
| Banda | Desempeño observable |
|---|---|
| 1–2,9 | No relaciona la regla con la necesidad ni puede explicar una aportación propia. |
| 3–4,9 | La propuesta automatiza algo, pero no define éxito o las predicciones no corresponden al algoritmo. |
| 5–6,9 | Formula requisitos comprobables, ejecuta una microprueba y revisa el algoritmo con su pareja, explicando qué ha aportado. |
| 7–8,9 | Usa un resultado para revisar una decisión y distingue la parte reutilizable del procedimiento. |
| 9–10,0 | Contrasta otra necesidad de control y acuerda una adaptación justificada de entradas y reglas. |
CYR.2.3.1 Construcción de la automatización y uso de recursos
Ser capaz de construir un sistema de computación o robótico, promoviendo la interacción con el mundo físico en el contexto de un problema del mundo real, de forma sostenible.
Evidencia. Microprototipo físico, necesidad, montaje y decisión de ahorro o reutilización.
| Banda | Desempeño observable |
|---|---|
| 1–2,9 | No hay interacción física comprobada ni relación entre montaje y problema. |
| 3–4,9 | Presenta piezas o simulación, pero no demuestra una primera respuesta real ni explica recursos necesarios. |
| 5–6,9 | Construye una primera respuesta física de control, documenta montaje revisado y relaciona utilidad, materiales y reutilización con el problema. |
| 7–8,9 | Revisa el prototipo tras una medida o limitación del entorno y ajusta un requisito de uso. |
| 9–10,0 | Compara dos opciones de actuación con prueba y recursos, evitando prometer ahorro no medido. |
Consultar la rúbrica de A02
Producto pruebas y mejora
CYR.2.1.1 Recorrido físico y características de las señales
Comprender el funcionamiento de los sistemas de computación física, sus componentes y principales características.
Evidencia. Montaje y explicación del recorrido de las dos entradas hasta la salida.
| Banda | Desempeño observable |
|---|---|
| 1–2,9 | El funcionamiento explicado no coincide con el montaje o atribuye una respuesta a un sensor no utilizado. |
| 3–4,9 | Una entrada funciona, pero no explica su combinación con la otra o la naturaleza de sus datos. |
| 5–6,9 | Describe componentes y características y demuestra cómo las dos entradas físicas influyen en el control, distinguiendo dato, condición y salida. |
| 7–8,9 | Aísla un fallo de lectura frente a uno de control y lo contrasta con medidas. |
| 9–10,0 | Compara una alternativa de sensor y justifica su adecuación y límites para la misma necesidad. |
CYR.2.1.3 Condiciones combinadas y memoria del control
Entender cómo funciona un programa informático, la manera de elaborarlo y sus principales componentes.
Evidencia. Código editable, secuencias de umbral y demostración de anulación.
| Banda | Desempeño observable |
|---|---|
| 1–2,9 | No explica la decisión de salida y el control contradice la prioridad declarada. |
| 3–4,9 | Controla un caso, pero oscila o se reactiva tras anulación sin advertirlo. |
| 5–6,9 | Implementa condiciones, memoria y modo manual según su tabla y verifica límites y prioridad, explicando las variables usadas. |
| 7–8,9 | Repara una contradicción de orden o reinicio de estado y repite la secuencia que la reveló. |
| 9–10,0 | Adapta el control a otra combinación de entradas y justifica con traza que conserva prioridades y comportamiento de frontera. |
CYR.2.2.1 Problema automatizable y procedimiento compartido
Conocer y resolver la variedad de problemas posibles, desarrollando un programa informático y generalizando las soluciones, tanto de forma individual como trabajando en equipo, colaborando y comunicándose de forma adecuada.
Evidencia. Control resuelto, pruebas comparables, depuración y modificación individual.
| Banda | Desempeño observable |
|---|---|
| 1–2,9 | El programa no resuelve el problema y no puede seguir una decisión propia. |
| 3–4,9 | Resuelve una condición aislada, pero cambia varias reglas sin relacionarlas con pruebas. |
| 5–6,9 | Resuelve la necesidad, compara resultados y corrige un fallo. Cada integrante explica o modifica una regla y colabora en la revisión. |
| 7–8,9 | Generaliza el patrón leer decidir actuar a otra condición y demuestra la adaptación. |
| 9–10,0 | Resuelve una variante nueva, argumenta entre dos algoritmos y comunica una pauta reutilizable al equipo. |
CYR.2.3.1 Construcción de la automatización y uso de recursos
Ser capaz de construir un sistema de computación o robótico, promoviendo la interacción con el mundo físico en el contexto de un problema del mundo real, de forma sostenible.
Evidencia. Sistema integrado, modo manual, resultados físicos y mejora contrastada.
| Banda | Desempeño observable |
|---|---|
| 1–2,9 | El montaje no controla una respuesta física o no se documenta su uso. |
| 3–4,9 | Actúa, pero no cumple una condición esencial o se afirma ahorro sin explicar de dónde procede. |
| 5–6,9 | Integra dos entradas y salida según diseño, demuestra automático y manual y documenta pruebas, límites y uso sostenible de materiales. |
| 7–8,9 | Mejora un umbral o actuación con ensayos comparables y explica el efecto real observado. |
| 9–10,0 | Evalúa una alternativa de construcción por utilidad y recursos y declara qué datos faltan para afirmar ahorro de energía. |
Videos, resources and sources
04 Microbit introducción a los condicionales luz automática
Watch in short sections. Connect one explanation with the diagram and try the example in this section. The written theory lets you complete the activity without playing the video.
The video keeps its original spoken language. Use the captions available in the player if they help.
Microbit: Primeros pasos Microbit
Watch in short sections. Connect one explanation with the diagram and try the example in this section. The written theory lets you complete the activity without playing the video.
The video keeps its original spoken language. Use the captions available in the player if they help.
Keep learning
- Microsoft MakeCode: Light Level
- Micro:bit Educational Foundation: Safety
- Microsoft MakeCode: Analog Read Pin
- Microsoft MakeCode: Digital Read Pin
- Creative Commons: The CC Licenses
Editorial revision: October 2026.
