Skip to content

Updated example to match convention #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Pixel test

Ensure your device works with this test:

.. literalinclude:: ../examples/pixel_test.py
:caption: examples/pixel_test.py
.. literalinclude:: ../examples/amg88xx_simpletest.py
:caption: examples/amg88xx_simpletest.py
:linenos:
10 changes: 3 additions & 7 deletions examples/pixel_test.py → examples/amg88xx_simpletest.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import time

import busio
import board

import adafruit_amg88xx

i2c_bus = busio.I2C(board.SCL, board.SDA)

amg = adafruit_amg88xx.AMG88XX(i2c_bus)
i2c = busio.I2C(board.SCL, board.SDA)
amg = adafruit_amg88xx.AMG88XX(i2c)

while True:
for row in amg.pixels:
#pad to 1 decimal place
# Pad to 1 decimal place
print(['{0:.1f}'.format(temp) for temp in row])
print("")

print("\n")
time.sleep(1)
1 change: 1 addition & 0 deletions examples/thermalcam.py → examples/rpi_thermal_cam.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""This example is for Raspberry Pi only! It will not work on CircuitPython!"""
import os
import math
import time
Expand Down