Skip to content

Commit

Permalink
Merge pull request #355 from pimoroni/patch-pico-explorer-examples
Browse files Browse the repository at this point in the history
Use I2C pins constants for #351
  • Loading branch information
Gadgetoid committed May 16, 2022
2 parents cbf1aba + af802c8 commit 22ab2b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions micropython/examples/pico_explorer/weatherstation_BME280.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 2 additions & 4 deletions micropython/examples/pico_explorer/weatherstation_BME68X.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 22ab2b2

Please sign in to comment.