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 BME68X library is *linked* against the MicroPython bindings, rather than compiled directly in.
This saves specifing the list of target files twice.
This changeset brings the BOSCH BME68X Sensor API library in as a submodule and makes it buildable with CMake.
A thin wrapper- the BME68X driver- provides simple init, configure, read_forced and read_parallel functions.
Two BME688 examples are available for forced-mode and parallel-mode operation.
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.
Rewrites the cursed Pico RGB Keypad code so that it can't hurt anyone else.
Turns out the whole loop could have been a bitwise operator.
The true lesson was the people we met along the way.
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
Confused myself by plugging this into a BG base. It gave all the appearance of working, but the time was not counting up.
Turns out the library will happily talk to no device whatsoever and when you "set_time" it's stored in an C array and returned as if it came from the RTC.