Waveshare 3.5" a LCD

So i searched to figure out how to get this to work and no luck that i found anything but people getting white screens. I did manage to get it work but haven’t got it to work with a desktop environment, works great for console and DietPi-Cloudshell. just follow below instructions and it should work, possibly work with other waveshare screens.

dietpi-config
select “1 : Display Options”
select “3 : LCD Panel addon”
select “waveshare32”
exit and reboot

~$ sudo apt install git
~$ sudo git clone https://github.com/waveshare/LCD-show.git
~$ cd LCD-show/
~$ sudo ./LCD35-show

wait for rebbot
~$ sudo nano /DietPi/config.txt
change “framebuffer_width=320” to “framebuffer_width=480”
change “framebuffer_height=240” to “framebuffer_height=320”
change “dtoverlay=waveshare32” to “dtoverlay=waveshare35a”
~$ sudo reboot

1 Like

Thank you so much for this! After hours of trying to get this going, this worked like a charm!

Jep, many thanks for sharing, I hope me or someone finds time to implement into DietPi: https://github.com/MichaIng/DietPi/issues/2394

I still haven’t figured out how to get it to run with a desktop environment I wish someone could help but I’m at ends meet with this, no expert just messing around

The biggest thing is the dtoverlay needs to be added but I don’t know how to other than to load the driver for the screen

Thanks for this, finally managed to get something other than a white screen running…
anyone have an idea how i can get PADD to load?

https://github.com/jpmck/PADD

I’m able to do it on ‘lite’ RPi image but on this would be ideal

it has to be possible somehow

I am trying to do the same thing and cannot believe there are no newer threads to be found.
I almost got a waveshare 3.5" B working following the steps above, but not quite.

Now there seem to be two screen buffers on top of each other - the tty1 I want (ie. login) and another showing DietPi Preboot information like the cpu governor info, and whenever I write something eg. try to log in, or run padd, the DietPi-preboot-text overwrites the screen and the stuff I want just flickers…

Modified:

Answering my own questiong, killing off process “fbcp” did the trick!
This was started in /etc/rc.local from wher I can disable it from running on boot.

@navdotnetreqs I see very same question ask on GitHub DietPi-Set_Hardware | Waveshare 3.5" support · Issue #2394 · MichaIng/DietPi · GitHub

If possible, try to stick to one platform.

0. Install DietPi

Set up internet connection.

1. Activate LCD:

dietpi-config

select “1 : Display Options”
select “3 : LCD Panel addon”
select “waveshare32”
exit and reboot

2. Setup Waveshare driver

(git can also be installed using dietpi-software)

sudo apt install git
git clone https://github.com/waveshare/LCD-show.git
cd LCD-show/
sudo ./LCD35-show

wait for reboot

3. Check /boot/config.txt

sudo nano /DietPi/config.txt

Make these changes if needed (I didn’t need to):

change “framebuffer_width=320” to “framebuffer_width=480”
change “framebuffer_height=240” to “framebuffer_height=320”
change “dtoverlay=waveshare32” to “dtoverlay=waveshare35a”

sudo reboot

4. Install fbturbo

sudo apt install xserver-xorg-video-fbturbo

5. Remove fbturbo config

This should be done after every time LCD35-show is executed:

mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.~~

6. Install LXDE

Using dietpi-software utility.

now sudo startx should display the LXDE desktop.

7. autostart

sudo dietpi-autostart

Set it to: 2: Automatic login

(First I set it to 16-LightDM login mask, but didn’t work. Although I suspect it made some useful changes)

If needed: Calibrate Touch

Click the “Menu” button on the taskbar, and choose “Preference” → “Calibrate Touchscreen”.
Finish the touch calibration following the prompts.
Copy the given config and write to:

sudo nano /etc/X11/xorg.conf.d/99-waveshare32_calibration.conf

Backlight Control

Type A LCD has no extra pads or pins to control the backlight. There is a hack to cut some traces and add some wires :smiley:

[Waveshare 3.5" LCD hack for backlight control · pskowronek/home-air-quality-and-assistant Wiki · GitHub]

For now, I didn’t need to automatically control the brightness. Just soldering a 1k pot did the job for me.

Sources

Other than this post, here are what I read and used to make things work, some may not be directly related:

[https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)_Manual_Configuration]
[HiR Information Report: Small TFT displays for Kali on the Raspberry Pi]
[3.5inch RPi LCD (A) Manual Configuration - Waveshare Wiki ]
[HiR Information Report: Small TFT displays for Kali on the Raspberry Pi]

1 Like

usually this did not exist on DietPi

You are right. I went trough my commands history and made corrections. That dietpi-autostart does all that needed.

But I’m a little confused: I clearly remember the config screen with Wayland options. I’d added those two lines because I remembered doing that manually in the config tool. But I can not find them in dietpi-config anymore. Am I hallucinating? Was it removed after I installed LXDE?

Probably you mixed it with RPi OS?

Maybe. I tried many different things before that. Sorry.

If anyone is struggling to rotate the screen on this, none of the default options work, you need to pass the rotate param on the dtparam line:

dtoverlay=waveshare35a:rotate=270

And for some reason, 270 will flip to 180 on it, and 180 flips to 90… not sure why

1 Like