0

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):
    pass

class buttonClass:
    def buttonOne(self):
        pumpConfiguration.pumpOne()
    def buttonTwo(self):
        pumpConfiguration.pumpTwo()

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

bartApp = raspPiBartenderApp()
bartApp.run()

another file with a pump config without any raspberry programming:

class pumpConfiguration:
    def pumpOne(self):
        print("hello")

    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:

[input]
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 acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.