Hyperpixel 4.0 Touchscreen Rotate with Display

This is something I forgot to add into the HyperPixel4 dtoverlay- the only way to rotate the touchscreen I’m aware of is to do it at the driver level. I’ve fixed the software to do this:

  1. Replace your /boot/overlays/hyperpixel4.dtbo with https://github.com/pimoroni/hyperpixel4/blob/master/dist/hyperpixel4.dtbo
  2. Change your /boot/config.txt so that dtoverlay=hyperpixel4 reads dtoverlay=hyperpixel4:rotate
  3. Keep the display_rotate=1 command you already have in place

For anyone who installs this new software (as of today) you just need to make these two changes in /boot/config.txt:

  1. Change display_rotate=3 to display_rotate=1
  2. Change dtoverlay=hyperpixel4 to dtoverlay=hyperpixel4:rotate