-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
bugSomething isn't workingSomething isn't working
Description
CircuitPython Version
Am I doing something wrong? This code seems to run fine when I don't show the plotter at code.circuitpython.org, but the browser freezes when I show the plotter:
import board, digitalio, adafruit_lis3dh, busio, time
# Set up accelerometer
i2c = busio.I2C(board.ACCELEROMETER_SCL, board.ACCELEROMETER_SDA)
int1 = digitalio.DigitalInOut(board.ACCELEROMETER_INTERRUPT)
accelerometer = adafruit_lis3dh.LIS3DH_I2C(i2c, address=0x19, int1=int1)
accelerometer.range = adafruit_lis3dh.RANGE_8_G
print("Running Accelerometer Code")
while True:
# Read, then plot the three axes x, y, z
x, y, z = accelerometer.acceleration
print((x, y, z)) # note the double parentheses!
time.sleep(0.1)
Maybe it's freezing when I try to plot multiple values? It seems to, for example, print((x)).
I'm using the latest Chrome (140.0.7339.133) on a Mac running Tahoe iOS26).
Workflow(s)
USB
Browser(s)
Latest Chrome
Console Log
Steps
Run code. Freezes
Description
Run code. Freezes
Additional information
Mac OS26 Tahoe.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working