Skip to content

Commit 5ee24ed

Browse files
author
jposada202020
committed
line_fix
1 parent 2d8792a commit 5ee24ed

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

examples/icm20x_icm20948_displayio_simpletest.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
# SPDX-License-Identifier: MIT
55

66
import time
7+
78
import board
89
from adafruit_display_text.bitmap_label import Label
9-
from terminalio import FONT
1010
from displayio import Group
11+
from terminalio import FONT
12+
1113
import adafruit_icm20x
1214

1315
# Simple demo of using the built-in display.
@@ -38,6 +40,11 @@
3840
while True:
3941
# update the text of the label(s) to show the sensor readings
4042
acc_x, acc_y, acc_z = icm.acceleration
41-
display_output_label.text = f"Acceleration\nx: {acc_x:.1f} m/s^2\ny: {acc_y:.1f} m/s^2\nz: {acc_z:.1f} m/s^2"
43+
display_output_label.text = (
44+
f"Acceleration\n"
45+
+ f"x: {acc_x:.1f} m/s^2\n"
46+
+ f"y: {acc_y:.1f} m/s^2\n"
47+
+ f"z: {acc_z:.1f} m/s^2"
48+
)
4249
# wait for a bit
4350
time.sleep(0.5)

0 commit comments

Comments
 (0)