Skip to content

Commit 663419a

Browse files
committed
clean up comments
1 parent d1fcc8a commit 663419a

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Usage Example
105105
while True:
106106
mag_x, mag_y, mag_z = sensor.magnetic
107107
108-
print(f"X:{mag_x:10.2f}, Y:{mag_y:10.2f}, Z:{mag_z:10.2f} uT")
108+
print(f"X:{mag_x:2.3f}, Y:{mag_y:2.3f}, Z:{mag_z:2.3f} G")
109109
print("")
110110
111111
time.sleep(1)

adafruit_qmc5883p.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@
100100

101101

102102
class QMC5883P:
103-
"""Driver for the QMC5883P 3-axis magnetometer."""
103+
"""Driver for the QMC5883P 3-axis magnetometer.
104+
105+
:param ~busio.I2C i2c_bus: The I2C bus the QMC5883P is connected to.
106+
:param int address: The I2C address of the device. Defaults to :const:`0x3C`
107+
"""
104108

105109
# Register definitions using adafruit_register
106110
_chip_id = ROUnaryStruct(_CHIPID, "<B")

examples/qmc5883p_simpletest.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010

1111
import adafruit_qmc5883p
1212

13-
i2c = board.I2C() # uses board.SCL and board.SDA
14-
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
13+
i2c = board.I2C()
14+
# i2c = board.STEMMA_I2C()
1515

1616
sensor = adafruit_qmc5883p.QMC5883P(i2c)
1717

18-
# Optional: Configure sensor settings
18+
# configure sensor settings
19+
# defaults to MODE_NORMAL, ODR_50HZ, RANGE_8G
20+
1921
# sensor.mode = adafruit_qmc5883p.MODE_CONTINUOUS
2022
# sensor.data_rate = adafruit_qmc5883p.ODR_10HZ
2123
# sensor.range = adafruit_qmc5883p.RANGE_2G

0 commit comments

Comments
 (0)