Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1269

Python • Re: Manipulate % variables Python

$
0
0
From https://docs.circuitpython.org/projects ... t/api.html
Now you have access to the acceleration attribute

acceleration = accelerometer.acceleration

property acceleration: Tuple[int, int, int]¶

The x, y, z acceleration values returned in a 3-tuple in m**2 / s**2

Code:

>>> acceleration=[1,2,3]>>> acceleration[2]3>>>

may give you ideas (pythons tuple indexes begin at 0 ...]

Statistics: Posted by dbrion1 — Thu Jan 25, 2024 12:48 pm



Viewing all articles
Browse latest Browse all 1269

Trending Articles