Duet 3 + Pi HDMI Touchscreen
-
@gtj0 no hast not the case.
the question is of an alternative DWC layout which is more adopted to the screen size and touch. -
DPI settings should remedy the two issues Danal mentione. Difficult to read and hard to touch - but if the screen is too small to fit DWC at a readable and touchable size, then the issue becomes removing stuff from the DWC layout not just making it bigger.
I took half a glance at it a while ago, but i'm just not familiar enough with the framework used
-
It's quite unfortunate that either Raspbian does not set the actual display DPI or that Chromium just doesn't respect this setting on Linux. It's worth trying to set the DPI via xrandr/xorg.conf.d (xrandr --dpi <actual DPI>) or to simply start Chromium with
--force-device-scale-factor=1.25
where 1.25 is the zoom factor in per cent.I haven't tried it yet but it's probably what I'll do next for my own test setup. FYI the script that invokes Chromium on DuetPi is
/usr/bin/launch-dwc
. -
Chris, perfect, THANKS... I will try a couple of those things. Especially because changing pixel (screen) size seems to have no effect when this monitor is plugged in.
My usual ways are:
/boot/config.txt \# uncomment to force a specific HDMI mode (this will force VGA) hdmi_group=2 hdmi_mode=nn (85 is 1280x1024, for bigger icons I was trying 4 for 640x480)
And/or
/boot/config.txt \# uncomment to force a console size. By default it will be display's size minus \# overscan. framebuffer_width=640 framebuffer_height=480
and those do not change anything with this touchscreen plugged in.
-
@chrishamm I went the scale factor route, and that works quite well. I ended up at 2.
-
@Danal would you mind showing a pic of the screen with the interface on? I'd like to run a screen on mine but 7in is quite massive on the printer; I'd rather have a smaller 5 or even 3.5in on it
-
Sure!
It is not mounted at the moment, I tend to just use web... but I'll be happy to mount it and get a pic later today.
-
Here is a photo of what I'm using.
- Raspberry Pi 7" Touch Screen Display
https://www.amazon.com/Raspberry-Pi-7-Touchscreen-Display/dp/B0153R2A9I - Smart Pi case (to hold) https://smarticase.com/
- A 24" ribbon to reach my Pi (not able to mount in the Smart Pi case as the ribbon cable to the Duet 3 board isn't long enough
https://www.amazon.com/gp/product/B00M4DAQH8 - Touch screen works, but I rather use the wireless mouse seen in the photo (I also have a wireless keyboard for when I need to key in G or M Codes)
7" isn't too bad if you have a good mounting plan and cable plan
- Raspberry Pi 7" Touch Screen Display
-
Were you able to keep the screen from going blank after a few minutes. Or rather keep the screen on always?
-
Yes. I was able to find a way to keep the screen on.
When you search this for Pi in general, there are many solutions, and quite a bit of conflicting info. I think this has to do with different distros for Pi, and/or different releases of the same distro, such as Raspbian Jessie v Stretch, or whatever. I had to try several before I found one that worked.
And... I have a log (or checklist) of everything I do to build a Pi for a Duet.
Unfortunately, what I did to keep the screen on, is missing from that log.
What is in this log, related to touchscreen, is:
- The mode and hotplug you should force.
- A way to invert the display and the touch mouse if something about brackets or cabling requires you to mount the display "upside down".
- How to make the DWC display bigger, 'zoomed in' so to speak, if you so desire.
These are all near the bottom.
# Get your Pi booted and on your network: # Download image (not lite) from https://duet3d.dozuki.com/Wiki/Getting_Started_With_Duet_3#Section_DuetPi # Do not unzip it. # Etch image to SD card. (search google for balena etcher) # Ignore windows error messages for the next drive letter after your SD. DO NOT format. # On the SD card, edit wpa_supplicant.conf for your network # On the SD card, create a file named 'ssh'. Empty is fine. # Insert SD in Pi and power up. First boot takes an extra minute or two. # Find IP address (varies a lot by router) or try "duet3.local" # From your PC, enter: ssh pi@x.x.x.x # Default password is raspberry CHANGE IT after you connect for the first time! # From the Pi command prompt: passwd #You now have a running Pi, but it is not completely built # to run a Duet 3 printer yet. #Set up OS options for Duet Software Framework: sudo raspi-config # Navigate to 5 interface options, then P4 SPI, and 5 again, P3 VNC # Verify via ls /dev/spidev* # Look for /dev/spidev0.0 # You may also wish to set country, time zone, etc. with raspi-config # Now complete setup for duetsoftwareframework. wget -q https://pkg.duet3d.com/duet3d.gpg wget -q https://pkg.duet3d.com/duet3d-unstable.list sudo mv duet3d.gpg /etc/apt/trusted.gpg.d/ sudo mv duet3d-unstable.list /etc/apt/sources.list.d/duet3d-unstable.list sudo chown root:root /etc/apt/trusted.gpg.d/duet3d.gpg sudo chown root:root /etc/apt/sources.list.d/duet3d-unstable.list sudo apt-get update sudo apt-get install apt-transport-https sudo apt-get install duetsoftwareframework # Verify you can connect to DWC via web server. # If you have configuration files (config.g, tool macros, etc) use DWC to upload them now. # Update the Pi itself: sudo apt-get update sudo apt-get upgrade (this may take 15 to 60 minutes) # Reboot is not absolutely required... but... sudo reboot ######################################### # End of required install for Duet 3 Pi # ######################################### # If you want to be able to edit files on the Pi from windows, via a netshare (not a mapped drive): sudo apt-get install samba sudo smbpasswd -a pi sudo nano /etc/samba/smb.conf # and change 'read only = yes' to no. # Then use a UNC like '\\192.168.7.101\pi' in a file open in your favorite editor. # If you ever want to flash a Duet board or PanelDue with BOSSA (an emergency recovery utility): # It is a good idea to pre-install this just in case you ever need it. sudo apt-get install git sudo apt update && sudo apt install -y libwxgtk3.0-dev libreadline-dev git clone https://github.com/shumatech/BOSSA cd BOSSA make cd ~ # If you plan to use a camera on the Pi for anything involving scripting or machine vision: git clone https://github.com/DanalEstes/installOpenCV chmod 744 ./installOpenCV/installOpenCV.sh sudo ./installOpenCV/installOpenCV.sh (this may take several hours, be sure the Pi doesn't sleep # If you have a touchscreen plugged into HDMI and USB (for mouse emulation): sudo sed -i "s/#hdmi_force_hotplug=./hdmi_force_hotplug=1/" /boot/config.txt sudo sed -i "s/#hdmi_group=./hdmi_group=1/" /boot/config.txt sudo sed -i "s/#hdmi_mode=./hdmi_mode=3/" /boot/config.txt # This one IS required, because you've changed stuff about the screen that happens at boot. sudo reboot # If your touchscreen is displaying upside down: sudo sed -i "\$adisplay_rotate=2" /boot/config.txt sudo bash -c 'echo "Section \"InputClass\"" > /usr/share/X11/xorg.conf.d/99-libinput.conf' sudo bash -c 'echo " Identifier \"libinput touchscreen catchall\"" >> /usr/share/X11/xorg.conf.d/99-libinput.conf' sudo bash -c 'echo " MatchDevicePath \"/dev/input/event0\"" >> /usr/share/X11/xorg.conf.d/99-libinput.conf' sudo bash -c 'echo " Driver \"libinput\"" >> /usr/share/X11/xorg.conf.d/99-libinput.conf' sudo bash -c 'echo " Option \"TransformationMatrix\" \"-1 0 1 0 -1 1 0 0 1\"" >> /usr/share/X11/xorg.conf.d/99-libinput.conf' sudo bash -c 'echo "EndSection" >> /usr/share/X11/xorg.conf.d/99-libinput.conf' # Again, required. sudo reboot # If you want to make the DWC on your attached touchscreen bigger: sudo nano /usr/bin/launch-dwc # Add this at the end of the line --force-device-scale-factor=3 # You can use fractions, like 2.5. Change and reboot until it looks good to you. # If you wish to be able to backup the entire SD card to a CIFS (i.e. windows) mounted shared drive: # (Not recommended at the moment, this disrupts the Pi during backups.) # One time: sudo apt-get install pv git clone https://github.com/lzkelley/bkup_rpimage.git /etc/fstab //USDNLW11/RPiBackups /RPiBackups cifs user=pi,password=raspberry 0 0 # Each Time, to run a backup: sudo mount RPiBackups sudo sh ./bkup_rpimage/bkup_rpimage.sh start -cz /RPiBackups/$(uname -n).img
-
@baird1fa
With the default installation (in regards to my setup with the 7" Pi touchscreen display) - the screen doesn't blank; however, it will blank after installing xscreensaversudo apt install xscreensaver
In the desktop -> preferences -> screensaver application/setting
you can pick a few default screen savers, I use the Mode -> blank display only (with a 5 min timeout). This uses the least CPU and frankly saves screen burn in (what I needed).Note: If the Duet 3 is only running from 5V USB input, the display blanks, but the Duet still draws a yellow lightening bolt in the upper right corner to let you know the board is still not powered by the main supply. If the main supply is powered on, the display blanks fully (aka no yellow lightening bolt)