Skip to content

Commit 832f663

Browse files
committed
updating README
1 parent fec9b0f commit 832f663

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.rst

+14-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,20 @@ To install in a virtual environment in your current project:
5656
Usage Example
5757
=============
5858

59-
.. code-block:: python
59+
.. code-block: python3
60+
import time
61+
import board
62+
import busio
63+
import adafruit_icm20649
64+
65+
i2c = busio.I2C(board.SCL, board.SDA)
66+
icm = adafruit_icm20649.ICM20649(i2c)
67+
68+
while True:
69+
print("Acceleration: X:%.2f, Y: %.2f, Z: %.2f m/s^2"%(icm.acceleration))
70+
print("Gyro X:%.2f, Y: %.2f, Z: %.2f degrees/s"%(icm.gyro))
71+
print("")
72+
time.sleep(0.5)
6073
6174
Contributing
6275
============

0 commit comments

Comments
 (0)