Skip to main content
added info re capacitive screen
Source Link
jpw
  • 123
  • 5

I just got it working under the Adafruit Raspbian Jessie image (although I am still fiddling with an inverted x/y touchscreen issue).

The secret seems to be:

  1. do the detailed install outlined here:

    https://github.com/mrichardson23/rpi-kivy-screen

When you edit the file ~/.kivy/config.ini per those instrucitons, also edit the [DISPLAY] section to set the display size to 320x240

  1. you also have to run** fbcp while you are running kivy

    see https://github.com/tasanakorn/rpi-fbcp

To install that you will probably need to install cmake:

sudo apt-get install cmake

Once I did those steps the examples ran.

** E.g., in one SSH terminal window I run

$ path_to_where_compiled_fbcp/fbcp

then in another SSH terminal window I run

$ python examples/demo/pictures/main.py

If you run into problems where the RESISTIVE touch screen coordinates seem reversed, try this in your ~/.kivy/config.ini file: (which also needs to be copied to /root/ using sudo cp)

[input]
mouse = mouse
mtdev_%(name)s = probesysfs,provider=mtdev
hid_%(name)s = probesysfs,provider=hidinput,param=rotation=270,param=invert_y=1

Note: if you are using the CAPACITIVE touch screen, the code is a bit different to use mtdev due to some sort of bug with the hidinput system for PiTFT:

[input]
mouse = mouse
%(name)s = probesysfs,provider=hidinput
pitft = mtdev,/dev/input/touchscreen,max_position_x=240,max_position_y=320,invert_y=0,invert_x=1,rotation=270

I just got it working under the Adafruit Raspbian Jessie image (although I am still fiddling with an inverted x/y touchscreen issue).

The secret seems to be:

  1. do the detailed install outlined here:

    https://github.com/mrichardson23/rpi-kivy-screen

When you edit the file ~/.kivy/config.ini per those instrucitons, also edit the [DISPLAY] section to set the display size to 320x240

  1. you also have to run** fbcp while you are running kivy

    see https://github.com/tasanakorn/rpi-fbcp

To install that you will probably need to install cmake:

sudo apt-get install cmake

Once I did those steps the examples ran.

** E.g., in one SSH terminal window I run

$ path_to_where_compiled_fbcp/fbcp

then in another SSH terminal window I run

$ python examples/demo/pictures/main.py

If you run into problems where the touch screen coordinates seem reversed, try this in your ~/.kivy/config.ini file:

[input]
mouse = mouse
mtdev_%(name)s = probesysfs,provider=mtdev
hid_%(name)s = probesysfs,provider=hidinput,param=rotation=270,param=invert_y=1

I just got it working under the Adafruit Raspbian Jessie image (although I am still fiddling with an inverted x/y touchscreen issue).

The secret seems to be:

  1. do the detailed install outlined here:

    https://github.com/mrichardson23/rpi-kivy-screen

When you edit the file ~/.kivy/config.ini per those instrucitons, also edit the [DISPLAY] section to set the display size to 320x240

  1. you also have to run** fbcp while you are running kivy

    see https://github.com/tasanakorn/rpi-fbcp

To install that you will probably need to install cmake:

sudo apt-get install cmake

Once I did those steps the examples ran.

** E.g., in one SSH terminal window I run

$ path_to_where_compiled_fbcp/fbcp

then in another SSH terminal window I run

$ python examples/demo/pictures/main.py

If you run into problems where the RESISTIVE touch screen coordinates seem reversed, try this in your ~/.kivy/config.ini file (which also needs to be copied to /root/ using sudo cp)

[input]
mouse = mouse
mtdev_%(name)s = probesysfs,provider=mtdev
hid_%(name)s = probesysfs,provider=hidinput,param=rotation=270,param=invert_y=1

Note: if you are using the CAPACITIVE touch screen, the code is a bit different to use mtdev due to some sort of bug with the hidinput system for PiTFT:

[input]
mouse = mouse
%(name)s = probesysfs,provider=hidinput
pitft = mtdev,/dev/input/touchscreen,max_position_x=240,max_position_y=320,invert_y=0,invert_x=1,rotation=270
added 283 characters in body
Source Link
jpw
  • 123
  • 5

I just got it working under the Adafruit Raspbian Jessie image (although I am still fiddling with an inverted x/y touchscreen issue).

The secret seems to be:

  1. do the detailed install outlined here:

    https://github.com/mrichardson23/rpi-kivy-screen

When you edit the file ~/.kivy/config.ini per those instrucitons, also edit the [DISPLAY] section to set the display size to 320x240

  1. you also have to run*run** fbcp while you are running kivy

    see https://github.com/tasanakorn/rpi-fbcp

To install that you will probably need to install cmake:

sudo apt-get install cmake

Once I did those steps the exmaplesexamples ran.

  • E.g., in one SSH terminal window I run

    $ path_to_where_compiled_fbcp/fbcp

** E.g., in one SSH terminal window I run

$ path_to_where_compiled_fbcp/fbcp

then in another SSH terminal window I run

$ python examples/demo/pictures/main.py

If you run into problems where the touch screen coordinates seem reversed, try this in your ~/.kivy/config.ini file:

[input]
mouse = mouse
mtdev_%(name)s = probesysfs,provider=mtdev
hid_%(name)s = probesysfs,provider=hidinput,param=rotation=270,param=invert_y=1

I just got it working under the Adafruit Raspbian Jessie image (although I am still fiddling with an inverted x/y touchscreen issue).

The secret seems to be:

  1. do the detailed install outlined here:

    https://github.com/mrichardson23/rpi-kivy-screen

When you edit the file ~/.kivy/config.ini per those instrucitons, also edit the [DISPLAY] section to set the display size to 320x240

  1. you also have to run* fbcp while you are running kivy

    see https://github.com/tasanakorn/rpi-fbcp

To install that you will probably need to install cmake:

sudo apt-get install cmake

Once I did those steps the exmaples ran.

  • E.g., in one SSH terminal window I run

    $ path_to_where_compiled_fbcp/fbcp

then in another SSH terminal window I run

$ python examples/demo/pictures/main.py

I just got it working under the Adafruit Raspbian Jessie image (although I am still fiddling with an inverted x/y touchscreen issue).

The secret seems to be:

  1. do the detailed install outlined here:

    https://github.com/mrichardson23/rpi-kivy-screen

When you edit the file ~/.kivy/config.ini per those instrucitons, also edit the [DISPLAY] section to set the display size to 320x240

  1. you also have to run** fbcp while you are running kivy

    see https://github.com/tasanakorn/rpi-fbcp

To install that you will probably need to install cmake:

sudo apt-get install cmake

Once I did those steps the examples ran.

** E.g., in one SSH terminal window I run

$ path_to_where_compiled_fbcp/fbcp

then in another SSH terminal window I run

$ python examples/demo/pictures/main.py

If you run into problems where the touch screen coordinates seem reversed, try this in your ~/.kivy/config.ini file:

[input]
mouse = mouse
mtdev_%(name)s = probesysfs,provider=mtdev
hid_%(name)s = probesysfs,provider=hidinput,param=rotation=270,param=invert_y=1
Source Link
jpw
  • 123
  • 5

I just got it working under the Adafruit Raspbian Jessie image (although I am still fiddling with an inverted x/y touchscreen issue).

The secret seems to be:

  1. do the detailed install outlined here:

    https://github.com/mrichardson23/rpi-kivy-screen

When you edit the file ~/.kivy/config.ini per those instrucitons, also edit the [DISPLAY] section to set the display size to 320x240

  1. you also have to run* fbcp while you are running kivy

    see https://github.com/tasanakorn/rpi-fbcp

To install that you will probably need to install cmake:

sudo apt-get install cmake

Once I did those steps the exmaples ran.

  • E.g., in one SSH terminal window I run

    $ path_to_where_compiled_fbcp/fbcp

then in another SSH terminal window I run

$ python examples/demo/pictures/main.py