1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

LCD upgrade?

Discussion in 'Mods and Upgrades' started by Robert Mangano, Sep 21, 2018.

  1. CdRsKuLL

    CdRsKuLL Member

    Joined:
    Sep 27, 2018
    Messages:
    81
    Likes Received:
    34
    Okay, I'm after a bit of help if possible. On a rating on 1 to 10 on Linux and Raspberry .. I would rate myself a 2 at best. I only know the very basic's really. GIve my a windows pc, Flash / PHP / VB.net / Java.. Photoshop / Inventor etc.. even the Arduino and I'm not half bad but the PI is a bit of an unknown to me sadly.

    So, this is where I'm up to. The new capacitive touchscreen has arrived and I've got it displaying correctly (wasn't hard). Now I need to install the touchscreen drive, which isn't available for the 5". I have however found a .c file for the 7" screen. So, I've edited the correct size values in it so I'm hoping it might work. I also plugged the screen into my Windows PC and checked the hardware ID's match for the touchscreen that are listed in the driver c file, so that's a good start. :) Its also working on my Windows PC so I know it's good.

    Now, I need to somehow copy this .c file over to the Pi and compile it somehow.. I think. The only info I can find on doing this is at https://wavesharejfs.blogspot.com/2018/03/re-compile-raspbian-kernel-for-touch.html

    Does all this make sense so far? Can I miss out the bit regarding the kernel and just install the driver? I presume once I get it all working I can just make up an image for others?

    pi.jpg

    Thanks,

    Steve
     
  2. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,857
    Likes Received:
    3,556
    It looks like it should be driverless if you do not need to change the touchscreen orientation. But the only thing Waveshare shows is using xorg11 which Robo does not use for their LCD. I think Kivy (the underlying library that RoboOS uses, will work with a libinput device like this one, you may need to change a configuration or two in the Kivy library, https://kivy.org/#home
     
    #22 WheresWaldo, Sep 30, 2018
    Last edited: Sep 30, 2018
  3. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,429
    Likes Received:
    7,056
  4. CdRsKuLL

    CdRsKuLL Member

    Joined:
    Sep 27, 2018
    Messages:
    81
    Likes Received:
    34
    Hey WheresWaldo,

    Many thanks for the pointers, it helps lots :) I was wondering if you could point me in the right direct on where I would find Kivy install folders. It's a bit of a step learning curve all this for me, so sorry if it s
    Hey WheresWaldo,

    Many thanks for the pointers, it helps lots :) I was wondering if you could point me in the right direction on where I would find Kivy install folder. It's a bit of a steep learning curve all this for me, so sorry if it seems a bit of newbie request.. I think I'm looking for RoboLCD folder from what I've read.

    Thanks,

    Steve
     
  5. CdRsKuLL

    CdRsKuLL Member

    Joined:
    Sep 27, 2018
    Messages:
    81
    Likes Received:
    34
    I did start it compiling but it failed. not sure why I am trying to locate the RoboLCD folder at the moment so I can edit the config file at the moment, hoping to enable the touchscreen from there. Fingers crossed

    thanks,

    Steve
     
  6. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,429
    Likes Received:
    7,056
    Yea, good luck. Not sure Robo has released the current (or complete) source for their mods on the Pi side. This is one difference with the R2/C2 from the R1.
     
  7. CdRsKuLL

    CdRsKuLL Member

    Joined:
    Sep 27, 2018
    Messages:
    81
    Likes Received:
    34
    Found the path...
    /home/pi/oprint/local/lib/python2.7/site-packages/

    might call it a night now, been at it for a good few hours.. progress is v.slow as I've no idea what I'm doing.. lol
     
    mark tomlinson likes this.
  8. CdRsKuLL

    CdRsKuLL Member

    Joined:
    Sep 27, 2018
    Messages:
    81
    Likes Received:
    34
    STOP THE CLOCK....

    I've only gone and bloody done it.. lol

    WheresWaldo, you were spot on, I needed to alter the config file for Kivy. However, I'm not sure what was / is needed as I've been at it, installing removing stuff all night. I'll start again now and retrace my steps, then I'll do a write up :)

    Thanks again both of you for all your help. I now have a capacitive 5" touchscreen.

    Just for my reference..

    Put MicroSD card in PC and edit config.txt file in the Boot drive..
    Comment out the below lines (add a # in front of them)

    #dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900
    #display_rotate=2

    Put the SDCard back in the R2 and SSH into it via Putty

    Kivy changes
    Path -
    oprint/local/lib/python2.7/site-packages/kivy

    Edit config - nano ~/.kivy/config.ini

    Edit [input] Section to..
    mouse = mouse
    mtdev_%(name)s = probesysfs,provider=mtdev
    hid_%(name)s = probesysfs,provider=hidinput

    Then do the following
    sudo apt-get update
    sudo apt-get install xserver-xorg-input-libinput
    sudo apt-get install mtdev-tools
    sudo reboot

    It should now reboot with a working touchscreen :)

    Will do a write up once I've retested it.

    Thanks,

    Steve
     
    #28 CdRsKuLL, Sep 30, 2018
    Last edited: Sep 30, 2018
    mark tomlinson likes this.
  9. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,429
    Likes Received:
    7,056
    Excellent! throw a thread in the projects sub-forum.
     
  10. EmbraceNext

    EmbraceNext New Member

    Joined:
    Jun 23, 2018
    Messages:
    21
    Likes Received:
    5
    This absolutely fantastic! Great job. I look forward to the write up as I was looking at doing this myself. I already bought the screen and tested. Just haven't gotten in there to do it.
     
  11. CdRsKuLL

    CdRsKuLL Member

    Joined:
    Sep 27, 2018
    Messages:
    81
    Likes Received:
    34
    Thanks for the kind comments. I've now done a 'how to' and posted it HERE . Please let me know if things aren't clear or I can do things easier, as I said I'm no Pi'guru, far from it. :)

    Steve
     

Share This Page