title: Update value in Kivy (Python) widget
body: <p>I'd like to display numeric values coming from a sensor (Tinkerforge ambient light sensor) in Kivy widgets. Unfortunately the variable 'illuminance' doesn't seem to change at all and the widgets display '0'.'illuminance' seems to update nicely and gets printed on the console. What am I doing wrong? </p>
  
  <pre><code>import kivy
  import random
  from kivy.clock import Clock
  from kivy.app import App
  from kivy.uix.label import Label
  from kivy.uix.boxlayout import BoxLayout
  
  from tinkerforge.ip_connection import IPConnection
  from tinkerforge.brick_dc import BrickDC
  from tinkerforge.bricklet_ambient_light import BrickletAmbientLight
  
  HOST = "localhost"          # Tinkerforge IP and port
  PORT = 4223
  UID = "uM9"             # sensor ID
  
  illuminance = 0
  
  ipcon = IPConnection()          # Create IP connection
  al = BrickletAmbientLight(UID, ipcon)   # Create device object
  ipcon.connect(HOST, PORT)       # Connect to brickd
  
  class TimerTink:
      def tinker(self):
          illuminance = al.get_illuminance()  #read sensor value
          print(illuminance)
  
  class TinkerApp(App):
      def build(self):
          main_layout = BoxLayout(padding=10, orientation="vertical")
          for i in range(2):
              h_layout = BoxLayout(padding=10)
              for i in range(2):
                  lbl = Label(text=str(illuminance),)
                  h_layout.add_widget(lbl)
              main_layout.add_widget(h_layout)
          event = Clock.schedule_interval(TimerTink.tinker, 1/2)
          return main_layout
  
  if __name__ == "__main__":
      app = TinkerApp()
      app.run()
  </code></pre>
  
  <p>Finally it's working, thanks to @YOSHI 's suggestions:</p>
  
  <pre><code>import kivy
  import random
  from kivy.clock import Clock
  from kivy.app import App
  from kivy.uix.label import Label
  from kivy.uix.boxlayout import BoxLayout
  from kivy.uix.floatlayout import FloatLayout
  
  from tinkerforge.ip_connection import IPConnection
  from tinkerforge.brick_dc import BrickDC
  from tinkerforge.bricklet_ambient_light import BrickletAmbientLight
  
  HOST = "localhost"          # Tinkerforge IP and port
  PORT = 4223
  UID = "uM9"             # sensor ID
  
  illuminance = 0
  
  ipcon = IPConnection()          # Create IP connection
  al = BrickletAmbientLight(UID, ipcon)   # Create device object
  ipcon.connect(HOST, PORT)       # Connect to brickd
  
  
  class TinkerApp(App):
  
      def build(self):
          i = 0
          main_layout = BoxLayout(padding=10, orientation="vertical")
          h_layout = FloatLayout(size=(300,300))
          self.label = Label(text=str(illuminance),pos=(i*100, i*100),size_hint = (.1,.1))
          h_layout.add_widget(self.label)
          main_layout.add_widget(h_layout)
          Clock.schedule_interval(self.timer, 0.1)
  
          return main_layout
  
      def timer(self, dt):
          illuminance = al.get_illuminance()  #read sensor value
          self.label.text = str(illuminance)
          print(str(illuminance))
  
  if __name__ == "__main__":
      app = TinkerApp()
      app.run()
  </code></pre>