Skip to content

Instantly share code, notes, and snippets.

@Hackin7
Created December 13, 2020 08:57
Show Gist options
  • Save Hackin7/8c3c00622df0d63f1fd8e5e6e1a8a42a to your computer and use it in GitHub Desktop.
Save Hackin7/8c3c00622df0d63f1fd8e5e6e1a8a42a to your computer and use it in GitHub Desktop.
Usage ./RotatePiTFT.sh (rotation 0/90/180/270) Meant to be used without rebooting. Was made quite long ago (2016) so not sure if still applicable
#!/bin/sh
echo 'sh RotatePiTFT.sh (rotation 0,90,180,270)'
if [$1 == '']; then
echo "Rotation (0,90,180,270):"
read rotation
else
rotation=$1
echo Rotation:
echo $rotation
fi
sudo rmmod fb_ili9340
sudo rmmod fbtft_device
sudo modprobe fbtft_device name=pitft rotate=$rotation
sudo adafruit-pitft-touch-cal -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment