Raspad won’t auto-rotate


  • I have ran Raspad os, and other Os and the raspad's screen wont rotate. I checked hardware and everything looks good. 



  • Hi @Efrain Santiago

    If no error is reported, please calibrate before starting automatic rotation.

    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 you install any OS other than raspad OS the touch rotate wont work, as the software you need to make it work is specific to raspad os and has to be manually installed and configured from their GIT, its a real faff but i can help you do it if you want. Took me ages to find how to do it and would be nice if raspad team made it easier to do.

    You can get the sotware package needed from here:
    https://github.com/sunfounder/python-sh3001

    you then need to configure/calibrate it:
    Configure Touch Screen

    also make sure you have the acellshim plugged in correctly to the pi, you can attach an image if your unsure and will tell you if it is correct.


  • Hi @CerberusStyle 

    Thanks for these instructions. I am in a bit of the same boat. I installed the generic Raspian (latest). The good news is that for what I'm using it for, it allows me to complile some tools I need, when Raspad OS did not. 

    However, installing the python code from git seemed to be successful, but when I try and run the command for the calibrator, I get this:

    FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/.config/lxsession/LXDE-pi/autostart'

    I'm wondering if there is something I'm missing with the install.


  • @Isaac Linder ok try this go to that location,( you may need to turn on show hidden files) and create a blank/empty file called " autostart " and then try to run the command again, see if that works. If not please let me know your exact version of " raspberry pi os " your running so i can install a copy and check, it hasnt been called rasbian for a little while now.


  • @Efrain Santiago Same issue. I was sent a replacement accelshim, but it doesn't seem to work either. So so so frustrrating!! I get the sensor recognised as being functioning but there is no 'red light' on the sensor. When I get the light working, then the software doesn't pick up the sensor!! And the calibrate script just returns errrors...


  • @Nick Crosby thats linux for you so many flavours you always have to work through errors step by step, and if thats not your thing then best bet is to stick with windows, but put the time in and it can be a very powerful tool.


  • @Nick Crosby 

    What system are you using? If it is not raspad os, please reinstall the software.
    After inserting the module into the Raspberry Pi, use the command to see if the i2c address of the device is detected.

    sudo i2cdetect -y 1

    Regarding the installation of the software, first clone the code base

    git clone https://github.com/sunfounder/python-sh3001.git


    After cloning is complete, enter the directory

    cd python-sh3001


    Install related library files

    sudo python3 install.py install


    Restart the Raspberry Pi after the installation is complete

    sudo reboot


    After restarting, run the following command to start automatic rotation

    sudo auto-rotator install

  • @CerberusStyle cheers! I will keep plugging away’


  • @RasPad Support Thank you, will try that. FWIW was using Raspad and running the i2cdetect command. Either the red light worked OR it was detected - but not simultaneously 


  • @CerberusStyle - Sorry that was probably me being new to Raspberry Pi. I used the top recommended version from the imager: I can try and install the proper device OS. However, for dependency reasons some of the software I was trying to install or compile wouldn't work with it. But I'll do a fresh install after backing up and make sure the auto-rotate works. I was less concerned with that when I had the original Raspad OS on there.


  • @Isaac Linder yer that raspberry pi os 32bit thats fine and will work, did you do as i said and manually create the autostart file in that location and try to run again ?? 


  • @Nick Crosby i didnt think i have ever seen a red light on my shim and its working fine. 😕


  • @CerberusStyle I did and got past that error. I failed to mention that. The new error is this:

    pi@raspberrypi:~/.config/lxsession/LXDE-pi $ sudo auto-rotator calibrate
    Traceback (most recent call last):
      File "/usr/local/bin/auto-rotator", line 11, in 
        load_entry_point('sh3001==0.0.1', 'console_scripts', 'auto-rotator')()
      File "/usr/local/lib/python3.7/dist-packages/sh3001-0.0.1-py3.7.egg/sh3001/__init__.py", line 117, in rotate
        sensor = Sh3001()
      File "/usr/local/lib/python3.7/dist-packages/sh3001-0.0.1-py3.7.egg/sh3001/sh3001.py", line 418, in __init__
        self.sh3001_init()
      File "/usr/local/lib/python3.7/dist-packages/sh3001-0.0.1-py3.7.egg/sh3001/sh3001.py", line 509, in sh3001_init
        regData = self.sh3001_read(self.SH3001_CHIP_ID,self.reg_status)
      File "/usr/local/lib/python3.7/dist-packages/sh3001-0.0.1-py3.7.egg/sh3001/sh3001.py", line 503, in sh3001_read
        return self.mem_read(data, self.SH3001_ADDRESS, reg_addr, timeout=5000, addr_size=8)
      File "/usr/local/lib/python3.7/dist-packages/sh3001-0.0.1-py3.7.egg/sh3001/i2c.py", line 134, in mem_read
        result = bytearray(self._i2c_read_i2c_block_data(addr, memaddr, num))
      File "/usr/local/lib/python3.7/dist-packages/sh3001-0.0.1-py3.7.egg/sh3001/i2c.py", line 36, in _i2c_read_i2c_block_data
        return self._smbus.read_i2c_block_data(addr, reg, num)
    OSError: [Errno 121] Remote I/O error
    

    And running a command from another instruction above yeilds this:

    pi@raspberrypi:~ $ sudo i2cdetect -y 1
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
    70: -- -- -- -- -- -- -- --                         
    pi@raspberrypi:~ $ 
    

  • @Isaac Linder ok that means the PI can not see the accelshim and why i2cdetect shows as empty,

    go to Menu / preferences / raspberry pi configuration

    click the interfaces tab

    enable i2c interface.

    click ok and restart the pi, when its booted back up run i2cdetect again and see if it shows up?

    i am assuming you have plugged the accelshim in correctly on the pi in the first 6 pins from the left as you look at the pi?


  • @CerberusStyle Thanks. I'm a complete idiot. The accelshim was still in my box. Not sure how I missed that. However, upon opening the case again, I also damaged my display cable with the screwdriver (no screw in that hole). Anyone have a quick tip on replacement cables?


  • @Isaac Linder depends which cable you damaged? do an image then i can tell you how easy it will be to fix, but that sound like it wont be a fun fix sorry.


  • @CerberusStyle  - It's the longer of the two L-shaped. It It only looked dented (which is still not great). I peeled the casing back a bit and don't see any hole in the shielding but I get a 'no display cable' now. Probably wrong thread for this, but if you have any ideas. I did ask about replacement parts on the contact form of the main site as well. Again thanks for all of your help and info though.


  • @Isaac Linder yer thats one for staff to answer sorry.

    @Nick Crosby did you get your working now too ??


  • Actually, I did get it working (for now). Not sure what I did. I assume a loose connection may still be at play. But works like a charm!


  • @RasPad Support sadly, the device is not detected, either when the red light is shining or not. I tried both accelshims I received from you...


  • @Nick Crosby and you plugged it on like my previous image and you confirmed i2c is turned on in config? What does i2cdetect show?


  • @CerberusStyle sadly, no. The shim is not detected when using i2cdetect command...

     


  • @Nick Crosby erm that didnt answer my question, i am trying to help you out but without more info i cant really do that hopefully you get your problem sorted soon.


  • @CerberusStyle I can now have both the red light on or off, but not detected in either state! I am puzzled...


  • @Isaac Linder good on you, nothing like tinkering to get stuff done. I am still tinkering...


  • @Nick Crosby My issue was more my ignorance and not seeing some of the directions. Firstly, as mentioned I hadn't even installed the accelshim. Then I put it in upside down (which @CerberusStyle mentioned at the beginning of the thread). Fixed that stuff. After the auto-rotator github code installed and everything was put in properly, it then did allow me to run the calibrate. I'm not sure about the red light either. There is one on the lower left of the Pi board, but can't remember if it was on or off before the shim.

    And I think having the accellshim upside down at first was why I thought I damaged my display cable (which I did) but it is now working as expected.


  • @Nick Crosby 

    It may just be that GND and VCC are connected, and the i2c interface is not attached. Please twist the pin headers outward when the Raspberry Pi is powered off, so that when the module is inserted in, the friction will be stronger and the contact will be tighter.
    You can watch the video for specific operations:https://drive.google.com/file/d/1mNBlPcESxOOv4jBu3WH0eBb6cHY84Xeu/view?usp=sharing

    At the same time, we also hope that you can feedback your test results with pictures or videos. After checking the email, our previous communication stayed at "hope you can provide a picture of the phenomenon", and have not received your reply.


  • @RasPad Support ok, will try this. But having to bend/twist GPIO pins-- not a great design of the shim if you have to mess about like this.

     

    As for pictures, I got the exact same i2cdetect output as @isaac Linder 

    I.e no device detected


  • @CerberusStyle yes and yes. I think it is a hardware issues/ connection to GPIO pins. Tx anyway for your advice


  • @RasPad Support i get a permission denied (publickey) error... when trying to clone


  • @Nick Crosby Try using sudo before the git clone if you didn't.

    Edit: Whoops, the opposite. Try not using it if you did.


  • @Isaac Linder @RasPad Support @CerberusStyle I seem finally to have got it to work, thank you all! Fiddling with the GPIO pins was the main fix...

     


  • @Nick Crosby @Isaac Linder 

    The clone instruction has been modified.


  • So thats everyone with it working, great work guys and enjoy.


  • i am having this problom too


  • @elijah keller without alot more infomation, there is not much i can do to help you, as each problem here has been a slightly different cause and solution.

    What OS are you using?

    have you plugged in the accel module to your pi ? (please provide an image so i can check you have doen this correctly)

    have you installed the rotation software to make the rotation work? (sh3001)


  • @CerberusStyle yes i have it plugged in and the 12c command detects it but when i try the forth command it givesn me an eror and i am using raspberry pi os


  • i know how to force rotate it but the problom with that is the touch screen doesent work with that


  • @elijah keller whats the error it is giving you ?


  • can't open file 'install.py': [Errno 2] No such file or directory


  • and when i try to run the calibretion script i get this

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


  • ok, you making this abit hard to help as you not posting the whole output, but that error tells me you have missed the step to enter the directory were the files have been downloaded.

    cd python-sh3001

     so try typing that and then post me the out given by terminal.


  • @CerberusStyle let me try running thru it again


  • here is the whole thing

    pi@raspberrypi:~ $ sudo auto-rotator calibrate
    sudo: auto-rotator: command not found
    pi@raspberrypi:~ $ pi@raspberrypi:~ $ sudo auto-rotator calibrate
    bash: pi@raspberrypi:~: command not found
    pi@raspberrypi:~ $ sudo: auto-rotator: command not found
    bash: sudo:: command not found
    pi@raspberrypi:~ $ git clone https://github.com/sunfounder/python-sh3001.git
    Cloning into 'python-sh3001'...
    remote: Enumerating objects: 184, done.
    remote: Counting objects:   0% (1remote: Counting objects:   1% (2remote: Counting objects:   2% (4remote: Counting objects:   3% (6remote: Counting objects:   4% (8remote: Counting objects:   5% (1remote: Counting objects:   6% (1remote: Counting objects:   7% (1remote: Counting objects:   8% (1remote: Counting objects:   9% (1remote: Counting objects:  10% (1remote: Counting objects:  11% (2remote: Counting objects:  12% (2remote: Counting objects:  13% (2remote: Counting objects:  14% (2remote: Counting objects:  15% (2remote: Counting objects:  16% (3remote: Counting objects:  17% (3remote: Counting objects:  18% (3remote: Counting objects:  19% (3remote: Counting objects:  20% (3remote: Counting objects:  21% (3remote: Counting objects:  22% (4remote: Counting objects:  23% (4remote: Counting objects:  24% (4remote: Counting objects:  25% (4remote: Counting objects:  26% (4remote: Counting objects:  27% (5remote: Counting objects:  28% (5remote: Counting objects:  29% (5remote: Counting objects:  30% (5remote: Counting objects:  31% (5remote: Counting objects:  32% (5remote: Counting objects:  33% (6remote: Counting objects:  34% (6remote: Counting objects:  35% (6remote: Counting objects:  36% (6remote: Counting objects:  37% (6remote: Counting objects:  38% (7remote: Counting objects:  39% (7remote: Counting objects:  40% (7remote: Counting objects:  41% (7remote: Counting objects:  42% (7remote: Counting objects:  43% (8remote: Counting objects:  44% (8remote: Counting objects:  45% (8remote: Counting objects:  46% (8remote: Counting objects:  47% (8remote: Counting objects:  48% (8remote: Counting objects:  49% (9remote: Counting objects:  50% (9remote: Counting objects:  51% (9remote: Counting objects:  52% (9remote: Counting objects:  53% (9remote: Counting objects:  54% (1remote: Counting objects:  55% (1remote: Counting objects:  56% (1remote: Counting objects:  57% (1remote: Counting objects:  58% (1remote: Counting objects:  59% (1remote: Counting objects:  60% (1remote: Counting objects:  61% (1remote: Counting objects:  62% (1remote: Counting objects:  63% (1remote: Counting objects:  64% (1remote: Counting objects:  65% (1remote: Counting objects:  66% (1remote: Counting objects:  67% (1remote: Counting objects:  68% (1remote: Counting objects:  69% (1remote: Counting objects:  70% (1remote: Counting objects:  71% (1remote: Counting objects:  72% (1remote: Counting objects:  73% (1remote: Counting objects:  74% (1remote: Counting objects:  75% (1remote: Counting objects:  76% (1remote: Counting objects:  77% (1remote: Counting objects:  78% (1remote: Counting objects:  79% (1remote: Counting objects:  80% (1remote: Counting objects:  81% (1remote: Counting objects:  82% (1remote: Counting objects:  83% (1remote: Counting objects:  84% (1remote: Counting objects:  85% (1remote: Counting objects:  86% (1remote: Counting objects:  87% (1remote: Counting objects:  88% (1remote: Counting objects:  89% (1remote: Counting objects:  90% (1remote: Counting objects:  91% (1remote: Counting objects:  92% (1remote: Counting objects:  93% (1remote: Counting objects:  94% (1remote: Counting objects:  95% (1remote: Counting objects:  96% (1remote: Counting objects:  97% (1remote: Counting objects:  98% (1remote: Counting objects:  99% (1remote: Counting objects: 100% (1remote: Counting objects: 100% (184/184), done.
    remote: Compressing objects:   1%remote: Compressing objects:   2%remote: Compressing objects:   3%remote: Compressing objects:   4%remote: Compressing objects:   5%remote: Compressing objects:   6%remote: Compressing objects:   7%remote: Compressing objects:   8%remote: Compressing objects:   9%remote: Compressing objects:  10%remote: Compressing objects:  11%remote: Compressing objects:  12%remote: Compressing objects:  13%remote: Compressing objects:  14%remote: Compressing objects:  15%remote: Compressing objects:  17%remote: Compressing objects:  18%remote: Compressing objects:  19%remote: Compressing objects:  20%remote: Compressing objects:  21%remote: Compressing objects:  22%remote: Compressing objects:  23%remote: Compressing objects:  24%remote: Compressing objects:  25%remote: Compressing objects:  26%remote: Compressing objects:  27%remote: Compressing objects:  28%remote: Compressing objects:  29%remote: Compressing objects:  30%remote: Compressing objects:  31%remote: Compressing objects:  32%remote: Compressing objects:  34%remote: Compressing objects:  35%remote: Compressing objects:  36%remote: Compressing objects:  37%remote: Compressing objects:  38%remote: Compressing objects:  39%remote: Compressing objects:  40%remote: Compressing objects:  41%remote: Compressing objects:  42%remote: Compressing objects:  43%remote: Compressing objects:  44%remote: Compressing objects:  45%remote: Compressing objects:  46%remote: Compressing objects:  47%remote: Compressing objects:  48%remote: Compressing objects:  50%remote: Compressing objects:  51%remote: Compressing objects:  52%remote: Compressing objects:  53%remote: Compressing objects:  54%remote: Compressing objects:  55%remote: Compressing objects:  56%remote: Compressing objects:  57%remote: Compressing objects:  58%remote: Compressing objects:  59%remote: Compressing objects:  60%remote: Compressing objects:  61%remote: Compressing objects:  62%remote: Compressing objects:  63%remote: Compressing objects:  64%remote: Compressing objects:  65%remote: Compressing objects:  67%remote: Compressing objects:  68%remote: Compressing objects:  69%remote: Compressing objects:  70%remote: Compressing objects:  71%remote: Compressing objects:  72%remote: Compressing objects:  73%remote: Compressing objects:  74%remote: Compressing objects:  75%remote: Compressing objects:  76%remote: Compressing objects:  77%remote: Compressing objects:  78%remote: Compressing objects:  79%remote: Compressing objects:  80%remote: Compressing objects:  81%remote: Compressing objects:  82%remote: Compressing objects:  84%remote: Compressing objects:  85%remote: Compressing objects:  86%remote: Compressing objects:  87%remote: Compressing objects:  88%remote: Compressing objects:  89%remote: Compressing objects:  90%remote: Compressing objects:  91%remote: Compressing objects:  92%remote: Compressing objects:  93%remote: Compressing objects:  94%remote: Compressing objects:  95%remote: Compressing objects:  96%remote: Compressing objects:  97%remote: Compressing objects:  98%remote: Compressing objects: 100%remote: Compressing objects: 100% (94/94), done.
    Receiving objects:   0% (1/184)  Receiving objects:   1% (2/184)  Receiving objects:   2% (4/184)  Receiving objects:   3% (6/184)  Receiving objects:   4% (8/184)  Receiving objects:   5% (10/184) Receiving objects:   6% (12/184) Receiving objects:   7% (13/184) Receiving objects:   8% (15/184) Receiving objects:   9% (17/184) Receiving objects:  10% (19/184) Receiving objects:  11% (21/184) Receiving objects:  12% (23/184) Receiving objects:  13% (24/184) Receiving objects:  14% (26/184) Receiving objects:  15% (28/184) Receiving objects:  16% (30/184) Receiving objects:  17% (32/184) Receiving objects:  18% (34/184) Receiving objects:  19% (35/184) Receiving objects:  20% (37/184) Receiving objects:  21% (39/184) Receiving objects:  22% (41/184) Receiving objects:  23% (43/184) Receiving objects:  24% (45/184) Receiving objects:  25% (46/184) Receiving objects:  26% (48/184) Receiving objects:  27% (50/184) Receiving objects:  28% (52/184) Receiving objects:  29% (54/184) Receiving objects:  30% (56/184) Receiving objects:  31% (58/184) Receiving objects:  32% (59/184) Receiving objects:  33% (61/184) Receiving objects:  34% (63/184) Receiving objects:  35% (65/184) Receiving objects:  36% (67/184) Receiving objects:  37% (69/184) Receiving objects:  38% (70/184) Receiving objects:  39% (72/184) Receiving objects:  40% (74/184) Receiving objects:  41% (76/184) Receiving objects:  42% (78/184) Receiving objects:  43% (80/184) Receiving objects:  44% (81/184) remote: Total 184 (delta 104), reused 136 (delta 60), pack-reused 0
    Receiving objects:  45% (83/184) Receiving objects:  46% (85/184) Receiving objects:  47% (87/184) Receiving objects:  48% (89/184) Receiving objects:  49% (91/184) Receiving objects:  50% (92/184) Receiving objects:  51% (94/184) Receiving objects:  52% (96/184) Receiving objects:  53% (98/184) Receiving objects:  54% (100/184)Receiving objects:  55% (102/184)Receiving objects:  56% (104/184)Receiving objects:  57% (105/184)Receiving objects:  58% (107/184)Receiving objects:  59% (109/184)Receiving objects:  60% (111/184)Receiving objects:  61% (113/184)Receiving objects:  62% (115/184)Receiving objects:  63% (116/184)Receiving objects:  64% (118/184)Receiving objects:  65% (120/184)Receiving objects:  66% (122/184)Receiving objects:  67% (124/184)Receiving objects:  68% (126/184)Receiving objects:  69% (127/184)Receiving objects:  70% (129/184)Receiving objects:  71% (131/184)Receiving objects:  72% (133/184)Receiving objects:  73% (135/184)Receiving objects:  74% (137/184)Receiving objects:  75% (138/184)Receiving objects:  76% (140/184)Receiving objects:  77% (142/184)Receiving objects:  78% (144/184)Receiving objects:  79% (146/184)Receiving objects:  80% (148/184)Receiving objects:  81% (150/184)Receiving objects:  82% (151/184)Receiving objects:  83% (153/184)Receiving objects:  84% (155/184)Receiving objects:  85% (157/184)Receiving objects:  86% (159/184)Receiving objects:  87% (161/184)Receiving objects:  88% (162/184)Receiving objects:  89% (164/184)Receiving objects:  90% (166/184)Receiving objects:  91% (168/184)Receiving objects:  92% (170/184)Receiving objects:  93% (172/184)Receiving objects:  94% (173/184)Receiving objects:  95% (175/184)Receiving objects:  96% (177/184)Receiving objects:  97% (179/184)Receiving objects:  98% (181/184)Receiving objects:  99% (183/184)Receiving objects: 100% (184/184)Receiving objects: 100% (184/184), 40.09 KiB | 376.00 KiB/s, done.
    Resolving deltas:  10% (11/104)  Resolving deltas:  13% (14/104)  Resolving deltas:  23% (24/104)  Resolving deltas:  25% (27/104)  Resolving deltas:  50% (52/104)  Resolving deltas:  51% (54/104)  Resolving deltas:  59% (62/104)  Resolving deltas:  75% (79/104)  Resolving deltas:  79% (83/104)  Resolving deltas:  85% (89/104)  Resolving deltas:  94% (98/104)  Resolving deltas: 100% (104/104) Resolving deltas: 100% (104/104), done.
    pi@raspberrypi:~ $ cd python-sh3001
    pi@raspberrypi:~/python-sh3001 $ pi@raspberrypi:~ $ sudo auto-rotator calibrate
    bash: pi@raspberrypi:~: command not found
    pi@raspberrypi:~/python-sh3001 $ sudo: auto-rotator: command not found
    bash: sudo:: command not found
    pi@raspberrypi:~/python-sh3001 $ sudo python3 install.py install
    python3: can't open file 'install.py': [Errno 2] No such file or directory
    pi@raspberrypi:~/python-sh3001 $  


  • here it is

    pi@raspberrypi:~ $ cd python-sh3001
    pi@raspberrypi:~/python-sh3001 $ 


  • ok type this and paste the output.

    clear
    cd python-sh3001
    dir

     


  • here is what i get

    pi@raspberrypi:~/python-sh3001 $ cd python-sh3001
    bash: cd: python-sh3001: No such file or directory
    pi@raspberrypi:~/python-sh3001 $ dir
    DESCRIPTION.rst
    docs
    LICENSE
    MANIFEST.in
    Readme.md
    setup.cfg
    setup.py
    sh3001
    pi@raspberrypi:~/python-sh3001 $ 


  • so copy these commands and paste them to the terminal?


  • @elijah keller ah ok that were the issue is there have renamed the script try typing this.

    sudo python3 setup.py install

     


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