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?

An easier solution has now been implemented for this. Jump to the last comment: Rotate Astrobox Touch display


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"
EndSection
  • /boot/config.txt

add the following line to the end of the file:

display_rotate=2

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

    replace
    dtoverlay=waveshare35b
    with
    dtoverlay=waveshare35b,rotate=270

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

    replace
    Option "Calibration" "3932 300 294 3801"
    with
    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:
    ssh pi@<PUT_HERE_IP_OF_YOUR_ASTROBOX>
    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
1 Like

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

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: https://www.raspberrypi.org/documentation/configuration/config-txt/video.md

Any chance of doing a 90 degree rotation on the screen? Thinking 5 or 7 inch

The SCREEN_ROTATE flag in the astrobox-config.conf now addresses this. More info in step 6 of this article: https://astroprint.zendesk.com/hc/en-us/articles/360015968891-Step-3-Flashing-AstroBox-Touch-Software