After installing kivy on my raspberry pi model 3 b+ i tried to launch a simple kivy application. When launched the application just goes black instead of showing the buttons.

import kivy
from kivy.app import App
from kivy.uix.gridlayout import GridLayout

kivy.require('1.11.0') # replace with your current kivy version !

from pumpConfig import pumpConfiguration
pumpConfiguration = pumpConfiguration()
class TouchGridLayout(GridLayout):

class buttonClass:
    def buttonOne(self):
    def buttonTwo(self):

class raspPiBartenderApp(App):
    buttonClass = buttonClass()
    def build(self):
        return TouchGridLayout()

bartApp = raspPiBartenderApp()

another file with a pump config without any raspberry programming:

class pumpConfiguration:
    def pumpOne(self):

    def pumpTwo(self):
        print("Pump 2")

On my computer the code works fine and the buttons respons to mouse clicks, jsut when launched on the raspberry pi model 3+ it wont show anything. Also when hitting escape on the keyboard connected to the raspberry the screen minimized and the program closes.

The config.ini file in the /.kivy/ folder looks like this:

mouse = mouse
mtdev_%(name)s = probesysfs,provider=mtdev
hid_%(name)s = probesysfs,provider=hidinput

as written in the kivy installing guide Is there anything i'm missing that is causing this problem?

PS: im using the official raspberry 7.0" touch screen

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.