@@ -97,13 +97,15 @@ def set_backlight(val):
9797# Button Objects
9898button_1 = Button (x = BUTTON_MARGIN , y = BUTTON_MARGIN ,
9999 width = BUTTON_WIDTH , height = BUTTON_HEIGHT ,
100- label = "Button 1" , label_font = font , style = Button .SHADOWROUNDRECT , label_color = 0x505050 ,
100+ label = "Button 1" , label_font = font ,
101+ style = Button .SHADOWROUNDRECT , label_color = 0x505050 ,
101102 fill_color = 0x9e9e9e , outline_color = 0x464646 )
102103buttons .append (button_1 )
103104
104105button_2 = Button (x = BUTTON_MARGIN , y = BUTTON_MARGIN * 2 + BUTTON_HEIGHT ,
105106 width = BUTTON_WIDTH , height = BUTTON_HEIGHT ,
106- label = "Button 2" , label_font = font , style = Button .SHADOWROUNDRECT , label_color = 0x505050 ,
107+ label = "Button 2" , label_font = font ,
108+ style = Button .SHADOWROUNDRECT , label_color = 0x505050 ,
107109 fill_color = 0x9e9e9e , outline_color = 0x464646 )
108110buttons .append (button_2 )
109111
@@ -197,11 +199,11 @@ def message(client, topic, message):
197199
198200# Set up a MiniMQTT Client
199201client = MQTT (socket ,
200- broker = secrets ['broker' ],
201- port = 1883 ,
202- username = secrets ['user' ],
203- password = secrets ['pass' ],
204- network_manager = wifi )
202+ broker = secrets ['broker' ],
203+ port = 1883 ,
204+ username = secrets ['user' ],
205+ password = secrets ['pass' ],
206+ network_manager = wifi )
205207
206208# Connect callback handlers to client
207209client .on_connect = connect
@@ -276,4 +278,4 @@ def message(client, topic, message):
276278 client .publish (mqtt_temperature , temperature )
277279
278280 print ('Sending motion sensor value: %d' % movement_value )
279- client .publish (mqtt_PIR , '{}' .format (movement_value ))
281+ client .publish (mqtt_PIR , '{}' .format (movement_value ))
0 commit comments