From 779c4bdef1fc634ac58eba5a1041fd7d5ae53418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Mon, 11 Jul 2022 01:37:49 +0200 Subject: [PATCH] maybe found address MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- test.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/test.py b/test.py index db06f7c..6ec6237 100644 --- a/test.py +++ b/test.py @@ -11,17 +11,8 @@ import time count = 2 i2c = busio.I2C(board.SCL, board.SDA) while True: - count += 1 - if count != 77: - print(hex(count)) - try: - bmp280 = adafruit_bmp280.Adafruit_BMP280_I2C(i2c, address=hex(count)) - print(bmp280.temperature) - exit() - except: - pass - else: - exit() + bmp280 = adafruit_bmp280.Adafruit_BMP280_I2C(i2c, address=0x4c) + print(bmp280.temperature) # print(get_temperature()