@@ -97,13 +97,15 @@ def set_backlight(val):
97
97
# Button Objects
98
98
button_1 = Button (x = BUTTON_MARGIN , y = BUTTON_MARGIN ,
99
99
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 ,
101
102
fill_color = 0x9e9e9e , outline_color = 0x464646 )
102
103
buttons .append (button_1 )
103
104
104
105
button_2 = Button (x = BUTTON_MARGIN , y = BUTTON_MARGIN * 2 + BUTTON_HEIGHT ,
105
106
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 ,
107
109
fill_color = 0x9e9e9e , outline_color = 0x464646 )
108
110
buttons .append (button_2 )
109
111
@@ -197,11 +199,11 @@ def message(client, topic, message):
197
199
198
200
# Set up a MiniMQTT Client
199
201
client = 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 )
205
207
206
208
# Connect callback handlers to client
207
209
client .on_connect = connect
@@ -276,4 +278,4 @@ def message(client, topic, message):
276
278
client .publish (mqtt_temperature , temperature )
277
279
278
280
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