File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 27
27
28
28
# place the labels in the middle of the screen with anchored positioning
29
29
tempandpress_output_label .anchor_point = (0 , 0 )
30
- tempandpress_output_label .anchored_position = (4 , board .DISPLAY .height // 2 )
30
+ tempandpress_output_label .anchored_position = (
31
+ 4 ,
32
+ board .DISPLAY .height // 2 - 40 ,
33
+ )
31
34
altitude_output_label .anchor_point = (0 , 0 )
32
35
altitude_output_label .anchored_position = (4 , board .DISPLAY .height // 2 + 20 )
33
36
43
46
while True :
44
47
# Update the label.text property to change the text on the display
45
48
tempandpress_output_label .text = (
46
- f"Temperature:{ bmp280 .temperature :0.1f} C, Pressure :{ bmp280 .pressure :0.1f} hPa"
49
+ f"Temperature:{ bmp280 .temperature :0.1f} C \n Pressure :{ bmp280 .pressure :0.1f} hPa"
47
50
)
48
51
altitude_output_label .text = f"Altitude:{ bmp280 .altitude :0.2f} mts"
49
52
# wait for a bit
You can’t perform that action at this time.
0 commit comments