Subject: Applied Mathematics in Programming
(Systems Reverse Engineering)
Status: Recovering Thermal Control System
Fragment V5
Develop the following activity in your note book!!!!
1. The Senses (Input Analysis)
Look at the
configuration block at the beginning and the loop() function.
- Question: What is the name of the
variable that stores data from the outside world? What is the specific
command the code uses to get the ambient temperature?
- Answer:
___________________________________________________________
2. The Muscles (Output Detection)
Find the
commands domeValve.attach(18) and domeValve.write(angle) in the code.
- Question: Which ESP32 pin is the dome
actuator connected to? Since the maximum opening angle is 180, what
type of hardware component is physically moving the gate?
- Answer:
___________________________________________________________
3. The Threshold (Critical Limit)
Analyze the
line: float delta
= tempMarte - 10.0;.
- Question: If the temperature on Mars
today is 8°C, what will be the value of the delta variable according to the
condition if
(delta < 0) delta = 0? Will the dome move at that temperature?
- Answer: ___________________________________________________________
4. The Math Model (The Brain)
Identify the
mathematical model: int angle =
2 * (delta * delta);.
- Question: This equation represents an Exponential
Curve. Perform the calculation: If the temperature rises to 20°C
(meaning delta is 10), what will be the
dome's opening angle?
- Calculation: $2 \times (10 \times 10) =$
__________ degrees.
5. System Restoration (Reconstruction)
Use the
wiring table to assemble the system in Wokwi.https://wokwi.com/projects/457343597580014593
| Component | Component Pin | ESP32 Pin |
| DHT22 (Sensor) | VCC | 3.3V |
| DHT22 (Sensor) | SDA (Data) | Pin 15 |
| DHT22 (Sensor) | GND | GND |
| Servo (Valve) | PWM (Orange) | Pin 18 |
| Servo (Valve) | VCC | 5V |
| Servo (Valve) | GND | GND |
- Task: Once connected, open the
Serial Monitor. Change the temperature of the DHT22 sensor. Does the angle
shown on the screen match your calculation from the previous point?
No hay comentarios:
Publicar un comentario