Includes "WS2812" and "APA102" modules, wrapping the libraries.
Uses a destructor to clean up the LED strip and resources when MicroPython is stopped/restarted.
Library:
Includes classes for driving WS2812 and APA102 LEDs and defines for Plasma features.
Encoder Example:
Supports connecting a Rotary Encoder via the Qw'St connector.
Works with APA102 or WS281X pixels.
Pressing A will cycle between:
1. Colour change
2. Brightness change
3. Cycle delay
Pressing B will switch back into auto-cycle mode.
Turning the encoder at any time will switch out of auto cycle mode into parameter adjust mode.
Also includes a bugfix to Rotary Encoder for getting the interrupt correctly.
Rainbow Example:
Basic rainbow cycle, press B to speed up and A to slow down.
The switch to common I2C and common definitions for SPI had broken an edge case in Pico Explorer where no backlight pin is used.
The backlight pin was inadvertently set to the front Breakout Garden SPI slot default, which is pin 20- this also happens to be the I2C SDA pin for Pico Explorer, breaking I2C comms.
This fix adds a new special case board "PICO_EXPLORER_ONBOARD" so that ST7789 can be initialised without the backlight pin.
This will be useful for anyone using ST7789 without the rest of the Pico Explorer library, although it feels a little contrived.
Also switches ST7735 over to the common defines.
Removes i2c_inst_t from constructors since it's ignored, and updated the Python bindings not to supply this argument. Instance is inferred from the supplied pins.
Removes all driver-specific SDA/SCL pin definitions and defaults.
Pin type is "uint" everywhere, but "PIN_UNUSED" is *int*_max for MicroPython compat. That's still a lot of pins!
Adds baudrate to the I2C class, and allows a driver (like Trackball) to check the baudrate is supported
This change adds a common I2C class, gathering various I2C functions into a single point of responsibility.
It's necessary for correctly managing the I2C bus pins and state across multiple devices.
* Add a common/pimoroni.hpp to list default pins for various add-ons
* Move the BG SPI Slot enum here for safe keeping
* Switch all GPIO pin references to "uint" to match Pico SDK and bring back PIN_UNUSED as UINT_MAX
This change removes file-relative include paths and adds the project root as a global include path.
* Project root added to CMakeLists.txt so that all targets can find includes
* Project root added micropython.cmake so that targets used by the MicroPython build can find includes
Note: pico-boilerplate projects must set this include path
* C driver for LTP305 breakout
* Micropython bindings for LTP305 breakout
* Micropython examples for dotmatrix
* C++ examples for dotmatrix
Co-authored-by: Phil Howard <phil@gadgetoid.com>
Move scroll_text into the C++ library and make it support std::string.
Move show_bitmap_1d to set_bitmap_1d in the C++ library. Use it as the basis for show_text and scroll_text.
Change show_text to set_text since it does not implicitly show the result.
Add a new pico-scroll demo to show off the scrolling text functionality.
Add IS31FL3731 driver
Add RGBMatrix5x5 library and example
Add Matrix11x7 library and example
Co-authored-by: ZodiusInfuser <christopher.parrott2@gmail.com>
A new constructor has been added which accepts a enum type BG_SPI_SLOT which can be either:
ST7789::BG_SPI_FRONT or ST7789::BG_SPI_BACK.
This selects the correct CS/BL pins for the respective breakout-garden SPI slot.
Additionally the PWM'd backlight is turned *on* by default to avoid any confusion when the user does not set a value.