Parking Finder
The Parking Finder system is a smart parking solution designed to help drivers efficiently locate available
Loading...
Searching...
No Matches
imu-sensor-data.py
Go to the documentation of this file.
1
6
import
time
7
8
import
board
9
10
import
adafruit_icm20x
11
12
i2c = board.I2C()
# uses board.SCL and board.SDA
13
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
14
icm = adafruit_icm20x.ICM20948(i2c)
15
16
17
while
True
:
18
print(
"Acceleration: X:{:.2f}, Y: {:.2f}, Z: {:.2f} m/s^2"
.format(*icm.acceleration))
19
print(
"Gyro X:{:.2f}, Y: {:.2f}, Z: {:.2f} rads/s"
.format(*icm.gyro))
20
print(
"Magnetometer X:{:.2f}, Y: {:.2f}, Z: {:.2f} uT"
.format(*icm.magnetic))
21
print(
""
)
22
time.sleep(0.5)
src
imu-gps
imu-sensor-data.py
Generated by
1.16.1