Use I2C pins constants for #351
This commit is contained in:
parent
aa75a7b957
commit
af802c8300
|
@ -4,6 +4,7 @@ import utime
|
||||||
|
|
||||||
from breakout_bme280 import BreakoutBME280
|
from breakout_bme280 import BreakoutBME280
|
||||||
from pimoroni_i2c import PimoroniI2C
|
from pimoroni_i2c import PimoroniI2C
|
||||||
|
from pimoroni import PICO_EXPLORER_I2C_PINS
|
||||||
|
|
||||||
# Pico Explorer boilerplate
|
# Pico Explorer boilerplate
|
||||||
import picoexplorer as display
|
import picoexplorer as display
|
||||||
|
@ -12,10 +13,7 @@ height = display.get_height()
|
||||||
display_buffer = bytearray(width * height * 2)
|
display_buffer = bytearray(width * height * 2)
|
||||||
display.init(display_buffer)
|
display.init(display_buffer)
|
||||||
|
|
||||||
PINS_BREAKOUT_GARDEN = {"sda": 4, "scl": 5}
|
i2c = PimoroniI2C(**PICO_EXPLORER_I2C_PINS)
|
||||||
PINS_PICO_EXPLORER = {"sda": 20, "scl": 21}
|
|
||||||
|
|
||||||
i2c = PimoroniI2C(**PINS_PICO_EXPLORER)
|
|
||||||
bme = BreakoutBME280(i2c)
|
bme = BreakoutBME280(i2c)
|
||||||
|
|
||||||
# lets set up some pen colours to make drawing easier
|
# lets set up some pen colours to make drawing easier
|
||||||
|
|
|
@ -4,6 +4,7 @@ import utime
|
||||||
|
|
||||||
from breakout_bme68x import BreakoutBME68X
|
from breakout_bme68x import BreakoutBME68X
|
||||||
from pimoroni_i2c import PimoroniI2C
|
from pimoroni_i2c import PimoroniI2C
|
||||||
|
from pimoroni import PICO_EXPLORER_I2C_PINS
|
||||||
|
|
||||||
# Pico Explorer boilerplate
|
# Pico Explorer boilerplate
|
||||||
import picoexplorer as display
|
import picoexplorer as display
|
||||||
|
@ -12,10 +13,7 @@ height = display.get_height()
|
||||||
display_buffer = bytearray(width * height * 2)
|
display_buffer = bytearray(width * height * 2)
|
||||||
display.init(display_buffer)
|
display.init(display_buffer)
|
||||||
|
|
||||||
PINS_BREAKOUT_GARDEN = {"sda": 4, "scl": 5}
|
i2c = PimoroniI2C(**PICO_EXPLORER_I2C_PINS)
|
||||||
PINS_PICO_EXPLORER = {"sda": 20, "scl": 21}
|
|
||||||
|
|
||||||
i2c = PimoroniI2C(**PINS_PICO_EXPLORER)
|
|
||||||
bme = BreakoutBME68X(i2c)
|
bme = BreakoutBME68X(i2c)
|
||||||
|
|
||||||
# lets set up some pen colours to make drawing easier
|
# lets set up some pen colours to make drawing easier
|
||||||
|
|
Loading…
Reference in New Issue