Raspad won’t auto-rotate


  • here is what i got 

    pi@raspberrypi:~/python-sh3001 $ sudo python3 setup.py install
    running install
    running bdist_egg
    running egg_info
    creating sh3001.egg-info
    writing sh3001.egg-info/PKG-INFO
    writing dependency_links to sh3001.egg-info/dependency_links.txt
    writing requirements to sh3001.egg-info/requires.txt
    writing top-level names to sh3001.egg-info/top_level.txt
    writing manifest file 'sh3001.egg-info/SOURCES.txt'
    reading manifest file 'sh3001.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'sh3001.egg-info/SOURCES.txt'
    installing library code to build/bdist.linux-armv7l/egg
    running install_lib
    running build_py
    creating build
    creating build/lib
    creating build/lib/sh3001
    copying sh3001/sh3001.py -> build/lib/sh3001
    copying sh3001/filedb.py -> build/lib/sh3001
    copying sh3001/basic.py -> build/lib/sh3001
    copying sh3001/i2c.py -> build/lib/sh3001
    copying sh3001/__init__.py -> build/lib/sh3001
    creating build/bdist.linux-armv7l
    creating build/bdist.linux-armv7l/egg
    creating build/bdist.linux-armv7l/egg/sh3001
    copying build/lib/sh3001/sh3001.py -> build/bdist.linux-armv7l/egg/sh3001
    copying build/lib/sh3001/filedb.py -> build/bdist.linux-armv7l/egg/sh3001
    copying build/lib/sh3001/basic.py -> build/bdist.linux-armv7l/egg/sh3001
    copying build/lib/sh3001/i2c.py -> build/bdist.linux-armv7l/egg/sh3001
    copying build/lib/sh3001/__init__.py -> build/bdist.linux-armv7l/egg/sh3001
    byte-compiling build/bdist.linux-armv7l/egg/sh3001/sh3001.py to sh3001.cpython-37.pyc
    byte-compiling build/bdist.linux-armv7l/egg/sh3001/filedb.py to filedb.cpython-37.pyc
    byte-compiling build/bdist.linux-armv7l/egg/sh3001/basic.py to basic.cpython-37.pyc
    byte-compiling build/bdist.linux-armv7l/egg/sh3001/i2c.py to i2c.cpython-37.pyc
    byte-compiling build/bdist.linux-armv7l/egg/sh3001/__init__.py to __init__.cpython-37.pyc
    creating build/bdist.linux-armv7l/egg/EGG-INFO
    copying sh3001.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO
    copying sh3001.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
    copying sh3001.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
    copying sh3001.egg-info/not-zip-safe -> build/bdist.linux-armv7l/egg/EGG-INFO
    copying sh3001.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
    copying sh3001.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
    creating dist
    creating 'dist/sh3001-0.0.1-py3.7.egg' and adding 'build/bdist.linux-armv7l/egg' to it
    removing 'build/bdist.linux-armv7l/egg' (and everything under it)
    Processing sh3001-0.0.1-py3.7.egg
    removing '/usr/local/lib/python3.7/dist-packages/sh3001-0.0.1-py3.7.egg' (and everything under it)
    creating /usr/local/lib/python3.7/dist-packages/sh3001-0.0.1-py3.7.egg
    Extracting sh3001-0.0.1-py3.7.egg to /usr/local/lib/python3.7/dist-packages
    sh3001 0.0.1 is already the active version in easy-install.pth

    Installed /usr/local/lib/python3.7/dist-packages/sh3001-0.0.1-py3.7.egg
    Processing dependencies for sh3001==0.0.1
    Searching for smbus==1.1.post2
    Best match: smbus 1.1.post2
    Processing smbus-1.1.post2-py3.7-linux-armv7l.egg
    smbus 1.1.post2 is already the active version in easy-install.pth

    Using /usr/local/lib/python3.7/dist-packages/smbus-1.1.post2-py3.7-linux-armv7l.egg
    Searching for RPi.GPIO==0.7.0
    Best match: RPi.GPIO 0.7.0
    Adding RPi.GPIO 0.7.0 to easy-install.pth file

    Using /usr/lib/python3/dist-packages
    Finished processing dependencies for sh3001==0.0.1
    pi@raspberrypi:~/python-sh3001 $ 


  • now what?


  • @elijah keller now we are getting somewere good job now we need to do teh final two commands

    sudo reboot

    then when the RPI has restarted follow this.

    https://raspad.readthedocs.io/en/latest/faq/RasPad3-FAQ.html#q-the-direction-of-the-display-does-not-change-with-the-direction-of-the-screen


  • when i type the command to calibrate i get this

    pi@raspberrypi:~ $ sudo auto-rotator calibrate
    sudo: auto-rotator: command not found


  • i am sorry to be so much trouble!


  • ok try 

    sudo auto-rotator install

  • here is what i get

    pi@raspberrypi:~ $ sudo auto-rotator install
    sudo: auto-rotator: command not found
    pi@raspberrypi:~ $ 


  • @elijah keller ok thats very odd,

    cd..
    cd /usr/local/bin
    dir
    

    do you see " auto-rotator " in that directory?


  • pi@raspberrypi:~ $ cd..
    bash: cd..: command not found
    pi@raspberrypi:~ $ cd /usr/local/bin
    pi@raspberrypi:/usr/local/bin $ dir
    raspad-auto-rotator  rotate-helper
    pi@raspberrypi:/usr/local/bin $ 


  • @elijah keller yes


  • @elijah keller oh dear god they have changed that filename too

    try this command now.

    sudo raspad-auto-rotator install

  • sudo raspad-auto-rotator install
    Traceback (most recent call last):
      File "/usr/local/lib/python3.7/dist-packages/sh3001-0.0.1-py3.7.egg/sh3001/filedb.py", line 33, in get
        conf = open(self.db,'r')
    FileNotFoundError: [Errno 2] No such file or directory: '/home/root/.raspad-auto-rotator/config'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/usr/local/bin/raspad-auto-rotator", line 15, in <module>
        sensor = Sh3001(db=CONFIG_FILE)
      File "/usr/local/lib/python3.7/dist-packages/sh3001-0.0.1-py3.7.egg/sh3001/sh3001.py", line 395, in __init__
        self.acc_offset = self.get_from_config('calibrate_offset_list', default=str(self.new_list(0)))
      File "/usr/local/lib/python3.7/dist-packages/sh3001-0.0.1-py3.7.egg/sh3001/sh3001.py", line 403, in get_from_config
        value = self.db.get(name, default=str(self.new_list(0)))
      File "/usr/local/lib/python3.7/dist-packages/sh3001-0.0.1-py3.7.egg/sh3001/filedb.py", line 49, in get
        conf = open(self.db,'w')
    FileNotFoundError: [Errno 2] No such file or directory: '/home/root/.raspad-auto-rotator/config'
    pi@raspberrypi:~ $ 


  • I'm getting that error now


  • I am so sorry for all the trouble


  • @elijah keller not your fault raspad have changed there script and not done it very well, what you need to do is go to that location and create a blank file called " config " and then run the command again.


  • go to what location?


  • I am so sorry I am a beginner at this stuff


  • so went to files and clicked on auto rotator and then created a new file called config, is tat what you needed? get back to you tomorrow


  • @CerberusStyle hi, so I'm still getting an error...


  • the location was in the error message " /home/root/.raspad-auto-rotator/ " so enter these commands

    cd /home/root/.raspad-auto-rotator/ 
    

    if it says that the location doesnt exist then type this

    sudo mkdir /home/root/.raspad-auto-rotator/

    and then go to that new lcoation with 

    cd /home/root/.raspad-auto-rotator/

    so now that you are in that directory (dir) you can run this command to make the needed file.

    sudo nano config

    this will open nano with a blank file called " config " to save this file press " ctrl + o " then " enter "

    to exit out of Nano press " ctrl + x "

    now run the calibrate command again and it should work.

     

    P.S. Dont write multiple messages, all that does it ding me multiple time and that gets annoying very fast  and i always answer question it just takes time as this is not my job and i do it out of goodness of my heart in my free time.

     

     


  • i am sorry to bug you again but i am still getting an error

    i@raspberrypi:~ $ cd /home/root/.raspad-auto-rotator/
    bash: cd: /home/root/.raspad-auto-rotator/: No such file or directory
    pi@raspberrypi:~ $ sudo mkdir /home/root/.raspad-auto-rotator/
    mkdir: cannot create directory ‘/home/root/.raspad-auto-rotator/’: No such file or directory
    pi@raspberrypi:~ $ 


  • @elijah keller  try this, the raspad staff really need to look at their script, so poorly designed.

    sudo mkdir .raspad-auto-rotator

    and then go to that new lcoation with 

    cd .raspad-auto-rotator

    so now that you are in that directory (dir) you can run this command to make the needed file.

    sudo nano config

    this will open nano with a blank file called " config " to save this file press " ctrl + o " then " enter "

    to exit out of Nano press " ctrl + x "

    now run the calibrate command again and it should work.

     

    P.S. Dont write multiple messages, all that does it ding me multiple time and that gets annoying very fast  and i always answer question it just takes time as this is not my job and i do it out of goodness of my heart in my free time.

     

     


  • ok thanks so much, i will try it!


  • @elijah keller scratch that try this they posted for another user.

    https://docs.raspad.com/en/latest/install_rotating_screen_service.html


  • ok, thanks so much will try it!


  • pi@raspberrypi:~ $ git clone https://github.com/raspad-tablet/raspad-auto-rotator
    fatal: destination path 'raspad-auto-rotator' already exists and is not an empty directory.
    pi@raspberrypi:~ $ cd raspad-auto-rotator
    pi@raspberrypi:~/raspad-auto-rotator $ sudo python3 install.py
    Installing RasPad auto rotator
    Install dependency
    [ OK ] update apt...
    [ OK ] install i2c-tools...
    [ OK ] install pip...
    [ OK ] install xinput...
    [ OK ] install setuptools...
    Setup raspad-auto-rotator service
    [ OK ] copy raspad-auto-rotator file...
    [ OK ] add excutable mode for raspad-auto-rotator...
    [ OK ] copy rotate-helper file...
    [ OK ] add excutable mode for rotate-helper...
    [ OK ] copy autostart...
    [Fail] Get SH3001 library...
    [ OK ] Start auto rotator...


    Error happened in install process:
    Get SH3001 library error:
      Status:128
      Error:fatal: destination path 'python-sh3001' already exists and is not an empty directory.

    Try to fix it yourself, or contact service@sunfounder.com with this message
    pi@raspberrypi:~/raspad-auto-rotator $ 

  • @elijah keller  do a full fresh install of Raspberry Pi os and start from scratch, once installed follow https://docs.raspad.com/en/latest/install_rotating_screen_service.html again.

    the system has got itself completely confused and thats only way to fix it now sadly.


  • ok, what now?


  • @elijah keller read up one message and follow that, joys of linux sometimes you just have to start again.


  • you mean the commands at the top 

    udo mkdir .raspad-auto-rotator

    ?


  • @elijah keller  no, this one.

    Do a full fresh install of Raspberry Pi OS and start from scratch, once installed follow https://docs.raspad.com/en/latest/install_rotating_screen_service.html again.

    the system has got itself completely confused and thats only way to fix it now sadly.


  • ok, i did this, but its still not working

    ps i'm so sorry for the inconveinenc! 


  • can you run this command and post the output now your on a fresh install and follow the setup proceedure above, as im guessing there was no error messages with the install as you havent stated any.

    sudo i2cdetect -y 1

  • 1
  • 2 / 2
Please login to reply this topic!