diff --git a/micropython/examples/pico_explorer/weatherstation_BME280.py b/micropython/examples/pico_explorer/weatherstation_BME280.py index 07c539ddc..d4e3ad210 100644 --- a/micropython/examples/pico_explorer/weatherstation_BME280.py +++ b/micropython/examples/pico_explorer/weatherstation_BME280.py @@ -4,6 +4,7 @@ from breakout_bme280 import BreakoutBME280 from pimoroni_i2c import PimoroniI2C +from pimoroni import PICO_EXPLORER_I2C_PINS # Pico Explorer boilerplate import picoexplorer as display @@ -12,10 +13,7 @@ display_buffer = bytearray(width * height * 2) display.init(display_buffer) -PINS_BREAKOUT_GARDEN = {"sda": 4, "scl": 5} -PINS_PICO_EXPLORER = {"sda": 20, "scl": 21} - -i2c = PimoroniI2C(**PINS_PICO_EXPLORER) +i2c = PimoroniI2C(**PICO_EXPLORER_I2C_PINS) bme = BreakoutBME280(i2c) # lets set up some pen colours to make drawing easier diff --git a/micropython/examples/pico_explorer/weatherstation_BME68X.py b/micropython/examples/pico_explorer/weatherstation_BME68X.py index 70e0d1093..5040cb2d1 100644 --- a/micropython/examples/pico_explorer/weatherstation_BME68X.py +++ b/micropython/examples/pico_explorer/weatherstation_BME68X.py @@ -4,6 +4,7 @@ from breakout_bme68x import BreakoutBME68X from pimoroni_i2c import PimoroniI2C +from pimoroni import PICO_EXPLORER_I2C_PINS # Pico Explorer boilerplate import picoexplorer as display @@ -12,10 +13,7 @@ display_buffer = bytearray(width * height * 2) display.init(display_buffer) -PINS_BREAKOUT_GARDEN = {"sda": 4, "scl": 5} -PINS_PICO_EXPLORER = {"sda": 20, "scl": 21} - -i2c = PimoroniI2C(**PINS_PICO_EXPLORER) +i2c = PimoroniI2C(**PICO_EXPLORER_I2C_PINS) bme = BreakoutBME68X(i2c) # lets set up some pen colours to make drawing easier