# BLUETOOTH pasos previos

### <span style="color: rgb(22, 145, 121);">**Conocimientos previos**</span>

{{@3000#bkmrk-tienes-que-visitar-l}}

{{@3000#bkmrk-%C2%BFqu%C3%A9-es-el-hc-06%3F-la}}

{{@3000#bkmrk-aprende-a-configurar}}

<iframe allowfullscreen="allowfullscreen" frameborder="0" height="569" id="bkmrk--1" src="https://docs.google.com/presentation/d/e/2PACX-1vT0vG1z61MuZXKmdiw4ga7z15FlQfeussqDNYzMauJSZUU2G2NlL7M-JjXb4PFT4YTigj9Yal8PzHmR/embed?start=false&loop=false&delayms=3000" width="100%"></iframe>

{{@3000#bkmrk-configuraci%C3%B3n-avanza}}

<iframe allowfullscreen="allowfullscreen" frameborder="0" height="569" id="bkmrk--0" src="https://docs.google.com/presentation/d/e/2PACX-1vSCv2j25rIQxh6pHjMM4n4AXttDDetQPL93qMrYfQO2p-BVC6tSzeRVgU7nVq4_pXEnLedrvF7LTM4V/embed?start=false&loop=false&delayms=3000" width="960"></iframe>

##### <span style="color: rgb(22, 145, 121);">**En mBlock INSTALAR LA EXTENSIÓN HC-06**</span>

Entramos en Extensión

[![DOMOTICA-BLUETOOTH1.png](https://libros.catedu.es/uploads/images/gallery/2023-12/scaled-1680-/domotica-bluetooth1.png)](https://libros.catedu.es/uploads/images/gallery/2023-12/domotica-bluetooth1.png)

Y ponemos en el buscador HC-06 nosotros hemos elegido esta, pero podría ser otra, es cuestión de experimentar

[![DOMOTICA-BLUETOOTH2.png](https://libros.catedu.es/uploads/images/gallery/2023-12/scaled-1680-/domotica-bluetooth2.png)](https://libros.catedu.es/uploads/images/gallery/2023-12/domotica-bluetooth2.png)

IMPORTANTE

- SOLO FUNCIONA CARGANDO EL PROGRAMA en vivo no
- NO PUEDES USAR ESTAS INTRUCCIONES DENTRO DE UN BLOQUE no entiendo por qué, si alguien lo consigue que me lo diga

[![DOMOTICA-BLUETOOTH3.png](https://libros.catedu.es/uploads/images/gallery/2023-12/scaled-1680-/domotica-bluetooth3.png)](https://libros.catedu.es/uploads/images/gallery/2023-12/domotica-bluetooth3.png)

##### <span style="color: rgb(22, 145, 121);">**Un ejemplo: Apertura simple de la puerta**</span>

Conectamos:

- RX del HC-06 en 12
- TX del HC-06 en 11
- El servo de la puerta en D4

y el código es:

[https://planet.mblock.cc/project/3481632](https://planet.mblock.cc/project/3481632)

[![mblock-bluetooch-simpleapartura.png](https://libros.catedu.es/uploads/images/gallery/2024-02/scaled-1680-/mblock-bluetooch-simpleapartura.png)](https://libros.catedu.es/uploads/images/gallery/2024-02/mblock-bluetooch-simpleapartura.png)

.