# RETOS no IoT

# Project 1.1 LED Flashing

<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" frameborder="0" height="874" src="https://www.youtube.com/embed/EFZorJNhyPI" title="22 de octubre de 2025" width="492"></iframe>

SOLUCIÓN CON BLOQUES [https://www.steamakersblocks.com/web/project/2520299](https://www.steamakersblocks.com/web/project/2520299)

SOLUCION CON CODIGO [https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-1-1-led-flashing](https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-1-1-led-flashing)

# Project 1.2 Breathing LED

En este código se va a utilizar la intensidad PWM para dar la sensación de subida y bajada gradual

<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" frameborder="0" height="874" src="https://www.youtube.com/embed/VzL1NKdFmjc" title="Project 1.2 Breathing LED" width="492"></iframe>

- Solución con bloques [https://www.steamakersblocks.com/web/project/2520329](https://www.steamakersblocks.com/web/project/2520329)
- Solución con código [https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-1-2-breathing-led](https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-1-2-breathing-led)

##### <span style="color: rgb(22, 145, 121);">**¿Qué son las salidas PWM?**</span>

{{@2946}}

# Project 2.1 Read the Button

<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" frameborder="0" height="815" src="https://www.youtube.com/embed/YrgTis942QU" title="22 de octubre de 2025" width="458"></iframe>

- SOLUCIÓN POR BLOQUES [https://www.steamakersblocks.com/web/project/2520373](https://www.steamakersblocks.com/web/project/2520373)
    - he optado por un retardo de 1 segundo para que se vea bien
- SOLUCIÓN CON CÓDIGO [https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-2-1-read-the-button](https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-2-1-read-the-button)

# Project 2.2. Table Lamp

<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" frameborder="0" height="874" src="https://www.youtube.com/embed/y5tsisEHaSQ" title="Project 2.2. Table Lamp" width="492"></iframe>

- SOLUCIÓN CON BLOQUES [https://www.steamakersblocks.com/web/project/2520536](https://www.steamakersblocks.com/web/project/2520536)
- SOLUCIÓN CON CÓDIGO [https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-2-2-table-lamp](https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-2-2-table-lamp)

# Project 3.1 Read the PIR Motion Sensor

<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" frameborder="0" height="874" src="https://www.youtube.com/embed/drgaWBeH39k" title="Project 3.1 Read the PIR Motion Sensor" width="492"></iframe>

- SOLUCIÓN CON BLOQUES [https://www.steamakersblocks.com/web/project/2520553](https://www.steamakersblocks.com/web/project/2520553)
- SOLUCIÓN CON CÓDIGO [https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-3-1-read-the-pir-motion-sensor](https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-3-1-read-the-pir-motion-sensor)

# Project 4.1 Play Happy Birthday

<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" frameborder="0" height="715" src="https://www.youtube.com/embed/5c0SQh66JUk" title="Project 4.1 Play Happy Birthday" width="402"></iframe>

<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" frameborder="0" height="874" src="https://www.youtube.com/embed/ryl1_8k0qCM" title="feliz cumpleaños" width="492"></iframe>

- SOLUCIÓN CON BLOQUES [https://www.steamakersblocks.com/web/project/2521317](https://www.steamakersblocks.com/web/project/2521317)
- SOLUCIÓN CON CÓDIGO [https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-4-1-play-happy-birthday](https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-4-1-play-happy-birthday)

Bueno, en la solución con bloques no es happy birthday pero podemos elegir la melodía que queramos

[![2025-10-22 19_22_02-Mattermost Desktop App.png](https://libros.catedu.es/uploads/images/gallery/2025-10/scaled-1680-/2025-10-22-19-22-02-mattermost-desktop-app.png)](https://libros.catedu.es/uploads/images/gallery/2025-10/2025-10-22-19-22-02-mattermost-desktop-app.png)

Si queremos crear un sonido RTTTL mirar [https://fgcoca.github.io/ESP32-STEAMakers/A05/](https://fgcoca.github.io/ESP32-STEAMakers/A05/)

# Project 5.1 Control the Door

<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" frameborder="0" height="874" src="https://www.youtube.com/embed/xW5coiRVthg" title="Project 5.1 Control the Door" width="492"></iframe>

- SOLUCIÓN POR BLOQUES [https://www.steamakersblocks.com/web/project/2520583](https://www.steamakersblocks.com/web/project/2520583)
- SOLUCIÓN POR CÓDIGO [https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-5-1-control-the-door](https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-5-1-control-the-door)

# Project 5.2 Close the Window

Si llueve, que cierre la ventana. Se ha decidido poner como límite de humedad 50, con sólo humedecer un poco el dedo, supera ese umbral, y si esta poco mojado, se seca enseguida y baja de 50 con lo que se vuelve a abrir la ventana.

Los ángulos correctos para el servo son

- 120º la ventana esta abierta
- 0º la ventana esta cerrada

<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" frameborder="0" height="715" src="https://www.youtube.com/embed/tUgCIbuZKTQ" title="Project 5.2 Close the Window" width="402"></iframe>

- SOLUCIÓN POR BLOQUES [https://www.steamakersblocks.com/web/project/2521324](https://www.steamakersblocks.com/web/project/2521324)
- SOLUCIÓN CON CÓDIGO [https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-5-2-close-the-window](https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-5-2-close-the-window)

<p class="callout warning">**AJUSTAMOS LA VENTANA PARA QUE SE CIERRE Y ABRA CORRECTAMENTE CON ESTOS ÁNGULOS Y YA PODEMOS PONER EL TORNILLO CENTRAL**</p>

[![2025-10-22 21_09_24-WhatsApp.png](https://libros.catedu.es/uploads/images/gallery/2025-10/scaled-1680-/2025-10-22-21-09-24-whatsapp.png)](https://libros.catedu.es/uploads/images/gallery/2025-10/2025-10-22-21-09-24-whatsapp.png)

# Project 6.1 RGB Sk6812

<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" frameborder="0" height="715" src="https://www.youtube.com/embed/CqLUw9FjAEs" title="Project 6.1 RGB Sk6812 bloques" width="402"></iframe>

<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" frameborder="0" height="715" src="https://www.youtube.com/embed/AujK40wtbx0" title="Project 6.1 RGB Sk6812" width="402"></iframe>

- SOLUCIÓN CON BLOQUES [https://www.steamakersblocks.com/web/project/2521483](https://www.steamakersblocks.com/web/project/2521483)
- SOLUCIÓN CON CÓDIGO [https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-6-1-rgb-sk6812](https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-6-1-rgb-sk6812)

<p class="callout success">Hemos puesto dos vídeos, uno con el programa de bloques y otro con el de código ¿Quién es quien?</p>

# Project 7.2 Button Control Fan

<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" frameborder="0" height="715" src="https://www.youtube.com/embed/sK7B5ff6m4g" title="Project 7.2 Button Control Fan" width="402"></iframe>

- SOLUCIÓN POR BLOQUES [https://www.steamakersblocks.com/web/project/2521510](https://www.steamakersblocks.com/web/project/2521510)
- SOLUCIÓN CON CÓDIGO [https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-7-2-button-control-fan](https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-7-2-button-control-fan)

# Project 8.2 Dangerous Gas Alarm

El detector de gas MQ2 es sensible al gas butano, si tenemos vitro, probarlo con un encendedor de gas pero sin hacer la chispa.

Hemos elegido que si detecta gas sale una advertencia por el display, suena un tono y hace funcionar el ventilador

<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" frameborder="0" height="874" src="https://www.youtube.com/embed/UMf1K0L-ZPs" title="Project 8.2 Dangerous Gas Alarm" width="492"></iframe>

También detecta el **alcohol**, como se puede ver en el curso de SMART HOME PARA MICROBIT [https://libros.catedu.es/books/smart-home-para-microbit/page/gas](https://libros.catedu.es/books/smart-home-para-microbit/page/gas)

<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" frameborder="0" height="715" src="https://www.youtube.com/embed/hSX2yizTSH4" title="DETECTOR GAS SMART HOME MICROBIT" width="402"></iframe>

<p class="callout warning">ATENCION: EN STEAMAKERSBLOCK no se encuentra este sensor de gas, pero como es un sensor de todo o nada pull down, es decir digital, que emite un 1 si no detecta y emite un 0 si detecta, se cambia por un sensor tactil, (o de lluvia o de cualquier cosa que haga 1 o 0)  
[![2025-10-23 13_29_13-WhatsApp.png](https://libros.catedu.es/uploads/images/gallery/2025-10/scaled-1680-/2025-10-23-13-29-13-whatsapp.png)](https://libros.catedu.es/uploads/images/gallery/2025-10/2025-10-23-13-29-13-whatsapp.png)  
</p>

- SOLUCIÓN CON BLOQUES HOME [https://www.steamakersblocks.com/web/project/2523009](https://www.steamakersblocks.com/web/project/2523009)
- SOLUCIÓN CON CÓDIGO https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-8-2-dangerous-gas-alarm

# Project 9.1 Temperature and Humidity Tester

[![2025-10-23 13_25_25-WhatsApp.png](https://libros.catedu.es/uploads/images/gallery/2025-10/scaled-1680-/2025-10-23-13-25-25-whatsapp.png)](https://libros.catedu.es/uploads/images/gallery/2025-10/2025-10-23-13-25-25-whatsapp.png)

- SOLUCION POR BLOQUES [https://www.steamakersblocks.com/web/project/2523126](https://www.steamakersblocks.com/web/project/2523126)
- SOLUCION CON CÓDIGO [https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-9-1-temperature-and-humidity-tester](https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-9-1-temperature-and-humidity-tester)

# Project 10.1 Open the Door

<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" frameborder="0" height="874" src="https://www.youtube.com/embed/zlfVCRCNZ68" title="Project 10.1 Open the Door" width="492"></iframe>

- SOLUCIÓN CON BLOQUES [https://www.steamakersblocks.com/web/project/2523179](https://www.steamakersblocks.com/web/project/2523179)
- SOLUCIÓN CON CÓDIGO [https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-10-1-open-the-door](https://docs.keyestudio.com/projects/KS5009/en/latest/docs/Python/Python.html#project-10-1-open-the-door)