# Evitar obstáculos

Programa al mBot para que sea capaz de evitar cualquier obstáculo, paredes... usando el sensor de ultrasonidos, aunque el del vídeo le ha puesto sirena!!

<iframe allowfullscreen="allowfullscreen" height="314" id="bkmrk--1" src="//www.youtube.com/embed/ScN4D67fgLI" width="560"></iframe>

![](https://libros.catedu.es/uploads/images/gallery/2022-02/embedded-image-trdaj6hp.png)

##### <span style="color: rgb(22, 145, 121);">**Solución**</span>

<span style="color: rgb(0, 0, 0);">Con mBlock 5.0 te vamos a proponer que lo obtengas de los programas ejemplo</span>

<span style="color: rgb(0, 0, 0);">[![mbot-salvaobstáculos.png](https://libros.catedu.es/uploads/images/gallery/2023-12/scaled-1680-/mbot-salvaobstaculos.png)](https://libros.catedu.es/uploads/images/gallery/2023-12/mbot-salvaobstaculos.png)</span>

<span style="color: rgb(0, 0, 0);">Y te proponemos que lo modifiques</span>

- <span style="color: rgb(0, 0, 0);">Que vaya rápido</span>
- <span style="color: rgb(0, 0, 0);">Que funcione en vivo</span>

##### <span style="color: rgb(22, 145, 121);">**RETO que no se atasque**</span>

Se ataca a veces, ¿y si le haces estas mejoras? (la captura está en mBlock3 pero para mBloc5 es igual)

**![](https://libros.catedu.es/uploads/images/gallery/2022-02/embedded-image-l7qrxtkk.png)**

##### <span style="color: rgb(22, 145, 121);">**RETO que salga de un laberinto**</span>

Una opción es salir de un laberinto, [página descarga piezas 3D](http://www.thingiverse.com/thing:1169585)