Exemplo n.º 1
0
 def set_leds(self, red, green, blue, white):
     if self.send_coap:
         params = "red=%d&green=%d&blue=%d&white=%d" % (red, green, blue, white)
         try:
             coapput.putResource(self.ep, PATH, self.remote, params, endless=False)
             self.root.status.text = "Ok"
         except Exception, e:
             self.root.status.text = repr(e)