Version 0.2.0
AWOOGA - ⚠️ I2C devices now use the "PimoroniI2C" class ⚠️
This release includes the recent changes merged in #129
Using I2C in MicroPython now requires an instance of the PimoroniI2C
class, which is created once and passed into individual breakout classes for them to use.
The PimoroniI2C
class has a __del__
method and finaliser, allowing Pico's I2C to be cleaned up during soft resets. This prevents an issue where using the wrong I2C pins would break I2C on a particular channel until the Pico is hard reset. A tricky situation for a device that... doesn't have a reset button!
See the Python examples for ... well ... examples of how to use the new I2C class with breakouts. For example, here's LTR559:
from pimoroni_i2c import PimoroniI2C
from breakout_ltr559 import BreakoutLTR559
PINS_BREAKOUT_GARDEN = {"sda": 4, "scl": 5}
PINS_PICO_EXPLORER = {"sda": 20, "scl": 21}
i2c = PimoroniI2C(**PINS_BREAKOUT_GARDEN)
ltr = BreakoutLTR559(i2c)
Eventually you'll be able to construct a PimoroniI2C
Note: This PimoroniI2C
class differs from machine.I2C
since it's a direct port of the I2C
class used to run out breakouts in C++. Interop may be possible at some point in the future but please understand that we are not raving lunatics and are making these odd, against-the-grain design choices because we want to re-use the C++ drivers in MicroPython.
Built against MicroPython release v1.15 - https://github.com/micropython/micropython/releases/tag/v1.15
Supported Breakouts
- AS7262 - 6-channel Spectral Sensor - https://shop.pimoroni.com/products/as7262-6-channel-spectral-sensor-spectrometer-breakout
- MSA301 - 3DoF Motion Sensor - https://shop.pimoroni.com/products/msa301-3dof-motion-sensor-breakout
- MICS6814 - Gas Sensor - https://shop.pimoroni.com/products/mics6814-gas-sensor-breakout
- RGB Potentiometer - https://shop.pimoroni.com/products/rgb-potentiometer-breakout
- RGB Encoder - https://shop.pimoroni.com/products/rgb-encoder-breakout
- IO Expander - https://shop.pimoroni.com/products/io-expander
- RV3028 - RTC - https://shop.pimoroni.com/products/rv3028-real-time-clock-rtc-breakout
- ST7735 - 0.96" LCD - https://shop.pimoroni.com/products/0-96-spi-colour-lcd-160x80-breakout
- IS31FL3730 - LTP-305 dual matrix breakout - https://shop.pimoroni.com/products/led-dot-matrix-breakout?variant=32274405654611
- LTR559 - Proximity/Presence/Light Sensor - https://shop.pimoroni.com/products/ltr-559-light-proximity-sensor-breakout
- IS31FL3731 - 11x7 and 5x5 matrix displays
- TrackBall - https://shop.pimoroni.com/products/trackball-breakout
- SGP30 - Air Quality Sensor - https://shop.pimoroni.com/products/sgp30-air-quality-sensor-breakout
- ST7789 - 1.3" LCD and 1.3" round LCD