Currently, I have a Raspberry Pi 1 Rev2 model B and a Raspberry Pi 3, I'm developing an app that could check dynamic values from several screens, I'm using a 7inch LCD Screen to look the graphics generated from the kivy app.
The problem is that when I test codes that I could use to my code, they are tested in windows 10 and works great, however, when I pasted this code inside the Raspberry Pi and run it, the screen goes black and I can see nothing more, also the touchscreen doesn't work in the kivy app (It works ok outside of the kivy app).
I started to think that was something related to the kivy versions, so I check them:
Windows 10 kivy version: 1.10.0 Raspberry Pi kivy version: 1.10.1.dev0 (I don't know what's the meaning of dev0)
So I use the line code: import kivy kivy.requires('1.10.0')
Without any good results, I will paste code from another thread from here in StackOverflow, however, I missed the link so forgive me that:
This is only a code that I wanted to test to use the same logic for my purposes, it will change the label text dynamically.
from kivy.app import App from kivy.uix.widget import Widget from kivy.properties import StringProperty import random class YourWidget(Widget): random_number = StringProperty() def __init__(self, **kwargs): super(YourWidget, self).__init__(**kwargs) self.random_number = str(random.randint(1, 100)) def change_text(self): self.random_number = str(random.randint(1, 100)) class YourApp(App): def build(self): return YourWidget() if __name__ == '__main__': YourApp().run()
<YourWidget>: BoxLayout: size: root.size Button: id: button1 text: "Change text" on_release: root.change_text() Label: id: label1 text: root.random_number
Let me know what ideas you have to help with this, it's really annoying that I can't keep going to this kind of problem.