# KlipperScreen - Guia de pantallas

## Sugerimos las siguientes pantalla para disfrutar de KlipperScreen:

En el caso que nuestra pantalla no funcione por defecto con KlipperScreen o necesiteis alguna configuracion especial como rotarla o ajustar ciertos parámetros

### Waveshare 3.5" (GPIO) o clones

{% embed url="<https://s.click.aliexpress.com/e/182731559?productUrl=https://s.click.aliexpress.com/e/182731559?productUrl=https://www.aliexpress.com/item/32918104361.html>" %}

Instalando los drivers Waveshare:

```bash
# Descargar los drivers Waveshare:
git clone https://github.com/waveshare/LCD-show.git

# Cambiar los permisos de la carpeta:
chmod -R 755 LCD-show

# Cambiamos al directorio:
cd LCD-show/

# Cambiamos permisos de ficheros:
chmod +x LCD35-show

# Ejecutamos el script de nuestro modelo de pantalla, en nuestro caso 3.5
sudo ./LCD35-show

# Podemos volver a ejecutarlo indicando el angulo de giro si queremos cambiarlo
sudo ./LCD35-show 180

```

Cambios a realizar para su funcionamiento (añadir al final del fichero):

```bash
sudo nano /boot/config.txt
```

Y modificaremos/añadiremos lo siguiente

```bash
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
dtoverlay=waveshare35a
#dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
hdmi_force_hotplug=1
#max_usb_current=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 800 533 60 6 0 0 0
hdmi_drive=2
```

ificaremos/añadiremos lo siguiente

### Waveshare 7" HDMI Touch (HDMI)

{% embed url="<https://www.amazon.es/dp/B07PKLGMSY/ref=cm_sw_r_cp_apa_fabc_jm77FbPWNZKBZ?_encoding=UTF8&psc=1>" %}

Cambios a realizar para su funcionamiento (añadir al final del fichero):

```
sudo nano /boot/config.txt
```

Y modificaremos/añadiremos lo siguiente

```bash
max_usb_current=1

hdmi_force_hotplug=1
config_hdmi_boost=7
hdmi_group=2
hdmi_mode=87
hdmi_drive=1
display_rotate=0 # 0 conectores a la derecha, 1 a 90 grados, 2 connectores a la izquierda, 3 270 grados
hdmi_cvt 1024 600 60 6 0 0 0
```

### **WAVESHARE 5" (DSI)**

Esta pantalla al conectarse usando el cable plano para display no suele ser necesaria configuración en todo caso nos puede interesar rotarla.

{% embed url="<https://amzn.to/3LdKfl1>" %}

![](/files/Bb7KmTQmDdci9CtRKuea)

Cambios a realizar para su funcionamiento (añadir al final del fichero o dentro de la sección \[all]):

```
sudo nano /boot/config.txt
```

```
# For 0 degree rotation:
# (no additional entries - default setting)

# For 90 degree rotation (top to right):
#display_lcd_rotate=1
#dtoverlay=rpi-ft5406,touchscreen-swapped-x-y=1,touchscreen-inverted-x=1

# For 180 degree rotation (upside down)
#display_lcd_rotate=2
#dtoverlay=rpi-ft5406,touchscreen-inverted-x=1,touchscreen-inverted-y=1

# For 270 degree rotation (top to left)
#display_lcd_rotate=3
#dtoverlay=rpi-ft5406,touchscreen-swapped-x-y=1,touchscreen-inverted-y=1
```

### BIQU HDMI5

<figure><img src="/files/QsEzK8AsjnuKLnKhl7uv" alt=""><figcaption></figcaption></figure>

{% embed url="<https://s.click.aliexpress.com/e/182731559?productUrl=https://s.click.aliexpress.com/e/182731559?productUrl=https://www.aliexpress.com/item/1005004673794018.html>" %}

{% code title="/boot/config.txt" %}

```bash
### BIQU HDMI5
# HDMI mode
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
hdmi_drive=1
```

{% endcode %}

### LongRunner 5" XPT2046 (HDMI GPIO Táctil)

{% embed url="<https://www.amazon.es/gp/product/B07QC6G6S9/ref=ppx_yo_dt_b_asin_image_o00_s00?ie=UTF8&psc=1>" %}

Cambios a realizar para su funcionamiento (añadir al final del fichero):

```
sudo nano /boot/config.txt
```

Y modificaremos/añadiremos lo siguiente:

```bash
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=0

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt=800 480 60 6 0 0 0

# Enable touchscreen on Elecrow HDMI interface.
dtparam=spi=on
dtparam=i2c_arm=on
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900
dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1
```

### **FYSECT CTP40 (GPIO)**

Para esta pantalla asegurarse de instslar los drivers siguiendo las instrucciones

{% embed url="<https://github.com/FYSETC/FYSETC-CTP40/tree/main/Pi3>" %}

## Troubleshooting

### Táctil incorrecto después de rotar UI en pantalla

En ocasion**e**s nos interesa girar los gráficos en nuestra pantalla y nos encontramos que el táctil sigue estando en la posición original.

En estos casos después de realizar el proceso para nuestra pantalla para rotarla iremos al fichero **/usr/share/X11/xorg.conf.d/45-edev.conf** añadiendo lo siguiente a la sección InputClass:

```
// /usr/share/X11/xorg.conf.d/45-edev.conf
Section "InputClass"
        Identifier "evdev touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "TransformationMatrix" "-1 0 1 0 -1 1 0 0 1
EndSection
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://klipper.3dwork.io/klipper/mejoras/klipperscreen-mejoras/klipperscreen-guia-de-pantallas.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
