# MONTAJE 7 BIS MATA-ALIENS con acelerómetro

¿Se puede hacer el anterior ejercicio con el acelerómetro? Por supuesto que sí, la única diferencia es que el Joystick va de 0 a 1024 pero el acelerómetro tiene otros valores :

<table border="1" id="bkmrk-valor-m%C3%8Dnimo-valor-r" style="border-collapse: collapse; width: 100%; height: 89.3907px;"><colgroup><col style="width: 25%;"></col><col style="width: 25%;"></col><col style="width: 25%;"></col><col style="width: 25%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">  
</td><td style="height: 29.7969px;">**VALOR MÍNIMO**</td><td style="height: 29.7969px;">**VALOR REPOSO**</td><td style="height: 29.7969px;">**VALOR MÁXIMO**</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**JOYSTICK**</td><td style="height: 29.7969px;">0</td><td style="height: 29.7969px;">512</td><td style="height: 29.7969px;">1.024</td></tr><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**ACELERÓMETRO**</td><td style="height: 29.7969px;">-1</td><td style="height: 29.7969px;">0</td><td style="height: 29.7969px;">+1</td></tr></tbody></table>

más o menos, pues cada placa es diferente

Puedes probar tus valores con este sencillo programa

[![2026-10-08 20&#95;36&#95;37-WhatsApp.png](https://libros.catedu.es/uploads/images/gallery/2026-10/scaled-1680-/2026-10-08-20-36-37-whatsapp.png)](https://libros.catedu.es/uploads/images/gallery/2026-10/2026-10-08-20-36-37-whatsapp.png)

Luego SI EL VALOR DEL ACELEROMETROX ES MAYOR QUE CERO que se mueva a la DERECHA y SI ES MENOR QUE CERO que se mueva a la IZQUIERDA así de sencillo tenemos que cambiar las instrucciones :

[![2026-10-08 20&#95;39&#95;58-Greenshot.png](https://libros.catedu.es/uploads/images/gallery/2026-10/scaled-1680-/2026-10-08-20-39-58-greenshot.png)](https://libros.catedu.es/uploads/images/gallery/2026-10/2026-10-08-20-39-58-greenshot.png)

El programa lo tienes aquí [https://github.com/JavierQuintana/Echidna/blob/master/MONTAJE%207-BIS%20ECHIDNABLACK2%20MATA-ALIENS%20CON%20ACELEROMETRO%20SIN%20MAPEAR.sb3](https://github.com/JavierQuintana/Echidna/blob/master/MONTAJE%207-BIS%20ECHIDNABLACK2%20MATA-ALIENS%20CON%20ACELEROMETRO%20SIN%20MAPEAR.sb3)

<iframe allowfullscreen="allowfullscreen" height="314" src="https://www.youtube.com/embed/DBJ8Str4sAA" width="560"></iframe>