Rotate Astrobox Touch display


This might be a dumb question but is there maybe some easy way (command line or config edit is okay) to rotate the Astrobox Touch display 180 degrees? Basically flip it upside down? I printed the 5 inch Astrobox Touch case (ultras slow and fine since I plan to keep it a while and want it to look good) and it turned out quite nice however it is more vertical than I like when using it…in fact if I just flip it over so it sits more horizontal it would be at a much better angle…I’d prefer not to redesign and reprint it but if I could just rotate the display it would be much more useable.

Also what size screws are recommended?

Screen Rotation?

For all readers, this is ONLY for the 5" screen, do not do this on the 3.5" or your screen will stop working.

It’s not super simple but you should be able to manage :wink: You need to modify two config files for a 180 degree rotation and reboot:

  • /etc/X11/xorg.conf.d/99-calibration.conf
Section "InputClass"
Identifier      "calibration"
MatchProduct    "ADS7846 Touchscreen"
Option  "Calibration"   "3905 208 3910 288"
Option  "SwapAxes"      "0"
  • /boot/config.txt

add the following line to the end of the file:



Thanks much Daniel, I will give it a try tonight!!!


Alright, I need to do the same with a 3.5" screen. How to proceed?


For 3.5" you do this:

  1. edit /boot/config.txt


  2. edit /etc/X11/xorg.conf.d/99-calibration.conf

    Option "Calibration" "3932 300 294 3801"
    Option "Calibration" "300 3932 3801 294"


the string /etc/X11/xorg.conf.d/99-calibration.conf where do I find it?


It is a path to file on your raspberry pi. You have to ssh to it and edit this file.


How do I get into the ssh on the astro box touch software? when I start it I start the software initialization. I also tried to look for a file with that name in the sd memory directory, but I can not find anything.
could you give me a hand?

  1. You have to enable SSH on your astrobox: HOW TO ENABLE SSH
    and then
  2. ssh to your box:
    If you are using linux/mac, just open terminal and execute command:
    It will ask for password: raspberry
    If you are using windows then you will need ssh client program (mobaterm / putty or something else)
  3. edit files at astrobox:
    sudo nano /boot/config.txt
    sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
    TIP: If you never used nano before, check tutorial how to edit, save and close this program, it is not trivial at the beginning.

if you are using Astrobox Touch you can edit those files without need to ssh… just connect keyboard to it and:

  1. press CTRL+ALT+F1
  2. put login: pi
  3. password: raspberry
  4. sudo nano /boot/config.txt
  5. sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
  6. do your changes and reboot


finally, you have been very helpful thank you very much!
the only flaw I found now is that the colors I know are jostled. I’ll give you an example: the red of the AstroBox logo appears blue, of course, all the other colors are different.


Something like this?

Sounds like color inversion but if you have original astrobox with original lcd screen it shouldn’t happen. How it was before rotation? It could be also a problem with connection between lcd and raspberry pi.


before the rotation it was identical to now. the defect is noticed a lot when I try to stream the camera, seeing the live directly from the LCD sembre was applied a “negative” filter.
I state that the screen is a Kuman 3.5 "LCD TFT

TouchScreen flipped on diagonal axis
TouchScreen flipped on diagonal axis

I guess it is HDMI screen… If yes, then you have to play with hdmi_group and hdmi_mode settings in raspberry pi config file (/boot/config.txt).
Check what do you have there… The manufacturer should provide correct settings fot this screen.
In my case it is group=2 mode=87… But I have 7 inch lcd screen.
Here you can find description of those valuse: