Skip to content

Commit e810fd9

Browse files
author
Kevin Townsend
committed
Fixed example to match API changes
1 parent bbb6b7c commit e810fd9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,15 @@ Usage Example
6666
SENSOR = adafruit_mlx90393.MLX90393(I2C_BUS, gain=adafruit_mlx90393.GAIN_1X)
6767
6868
while True:
69-
MX, MY, MZ = SENSOR.read_data(delay=1.0, raw=False)
69+
MX, MY, MZ = SENSOR.read_data(raw=False)
7070
print("[{}]".format(time.monotonic()))
7171
print("X: {} uT".format(MX))
7272
print("Y: {} uT".format(MY))
7373
print("Z: {} uT".format(MZ))
7474
# Display the status field if an error occured, etc.
7575
if SENSOR.last_status > adafruit_mlx90393.STATUS_OK:
7676
SENSOR.display_status()
77+
time.sleep(1.0)
7778
7879
Contributing
7980
============

examples/adafruit_mlx90393_simpletest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
SENSOR = adafruit_mlx90393.MLX90393(I2C_BUS, gain=adafruit_mlx90393.GAIN_1X)
99

1010
while True:
11-
MX, MY, MZ = SENSOR.read_data(delay=1.0, raw=False)
11+
MX, MY, MZ = SENSOR.read_data(raw=False)
1212
print("[{}]".format(time.monotonic()))
1313
print("X: {} uT".format(MX))
1414
print("Y: {} uT".format(MY))
1515
print("Z: {} uT".format(MZ))
1616
# Display the status field if an error occured, etc.
1717
if SENSOR.last_status > adafruit_mlx90393.STATUS_OK:
1818
SENSOR.display_status()
19+
time.sleep(1.0)

0 commit comments

Comments
 (0)