Skip to content

Commit 2fb1f9b

Browse files
authored
Merge pull request #9 from kattni/example-update
Updated example to match convention
2 parents 3a6ab78 + e5a5c6f commit 2fb1f9b

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

docs/examples.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Pixel test
33

44
Ensure your device works with this test:
55

6-
.. literalinclude:: ../examples/pixel_test.py
7-
:caption: examples/pixel_test.py
6+
.. literalinclude:: ../examples/amg88xx_simpletest.py
7+
:caption: examples/amg88xx_simpletest.py
88
:linenos:
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
import time
2-
32
import busio
43
import board
5-
64
import adafruit_amg88xx
75

8-
i2c_bus = busio.I2C(board.SCL, board.SDA)
9-
10-
amg = adafruit_amg88xx.AMG88XX(i2c_bus)
6+
i2c = busio.I2C(board.SCL, board.SDA)
7+
amg = adafruit_amg88xx.AMG88XX(i2c)
118

129
while True:
1310
for row in amg.pixels:
14-
#pad to 1 decimal place
11+
# Pad to 1 decimal place
1512
print(['{0:.1f}'.format(temp) for temp in row])
1613
print("")
17-
1814
print("\n")
1915
time.sleep(1)

examples/thermalcam.py renamed to examples/rpi_thermal_cam.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""This example is for Raspberry Pi only! It will not work on CircuitPython!"""
12
import os
23
import math
34
import time

0 commit comments

Comments
 (0)