Narrative: The "Alpha-7 Base" Reconstruction
The central processor of the Alpha-7 Lunar Base has been corrupted. The recovery team has only managed to salvage raw fragments of the original C++ code. As the Lead Architects, your mission is to deconstruct these code snippets to reconstruct the original Pseudocode Logic. Only by understanding the 'why' behind the code can we fully restore the base’s automation systems.
Develop in your notebook!!
| Scenario | Arduino Code (C++) | Pseudocode (Your Mission) |
| 1. Heater | if (temp < 10) { digitalWrite(H, HIGH); } | |
| 2. DANGER | Serial.println("DANGER"); delay(5000); | |
| 3. Lights | for (int i=255; i>=0; i--) { analogWrite(L, i); } | |
| 4. Door | if (input == pass) { openDoor(); } | |
| 5. Solar | int v = analogRead(LDR); servo.write(v/6); | |
| 6. Rain | if (digitalRead(rain) == LOW) { tone(bz, 1000); } | |
| 7. Counter | if (digitalRead(sen) == HIGH) { count++; } |
No hay comentarios:
Publicar un comentario