Wykres commitów

27 Commity (5a92a9c73505a8cb8fa3320a1605379e8892a05c)

Autor SHA1 Wiadomość Data
helgibbons ce24330842 Stellar: move font to common 2023-07-02 15:19:32 +01:00
Phil Howard bff6bd023e Unicorn: Move gamma LUTs to pimoroni_common. 2023-06-04 21:46:12 +01:00
ZodiusInfuser 41225090ef Added some C specific examples for Plasma Stick 2022-10-17 16:15:02 +01:00
Phil Howard de3ceac4a5 Pico Scroll/Unicorn: Fix static memory alloc for Pico W.
Pico Scroll and Pico Unicorn were allocating static buffers for gamma and font data respectively.

Make Pico Scroll's `__bitmap` static.

Move Pico Unicorn's three GAMMA tables to one 14-bit table in "pimoroni_common.hpp". Rename "GAMMA" to "GAMMA_8BIT".
2022-07-22 14:15:53 +01:00
Phil Howard b66da12c1b ST7789/PicoDisplay: Update C++ examples. Rename GenericST7789 -> PicoDisplayST7789. 2022-06-13 20:11:09 +01:00
Phil Howard 13f0813d8a ST7789/PicoDisplay: Collapse make_new into one using pimoroni_bus. 2022-06-13 20:11:09 +01:00
Phil Howard a483b2aad4 ST7789/PicoGraphics: Refactor for init & rotation. 2022-06-13 20:11:09 +01:00
ZodiusInfuser 0efe210c4c Added in PH_EN motor driver, and zeropoint support 2022-04-25 16:16:02 +01:00
ZodiusInfuser ba076ccc7b Renamed Snapshot back to Capture 2022-04-22 16:06:54 +01:00
ZodiusInfuser 180df9e085 Merge branch 'motor-pio' into motor-and-encoder 2022-04-19 16:28:12 +01:00
ZodiusInfuser 70b589d431 Fixed inability to use more than one encode, plus other things 2022-04-13 20:12:44 +01:00
ZodiusInfuser ac3edafbf4 Contined motor dev 2022-04-05 16:53:36 +01:00
Phil Howard 0d43973326 Bitmap Fonts: Refactor and support for pound/degrees. 2022-04-01 15:38:42 +01:00
Phil Howard e4bde0985a Bitmap Fonts: Add final five chars. 2022-04-01 15:38:29 +01:00
Phil Howard 6a9bc8688f Bitmap Fonts: Add accent rendering.
Render accents above and below the 64 characters > 127.

Different offsets for upper/lower case characters.
2022-04-01 15:38:20 +01:00
Phil Howard ef940cc5ea Fonts: Ungracefully handle accented characters.
Introduce a lookup table for the 64 accented characters > 127.

Remaps these characters back to a printable, non-accented version.
2022-03-31 16:13:30 +01:00
ZodiusInfuser ce31f88e2d Added HEADER_I2C_PINS etc for rp application boards 2022-03-30 14:29:02 +01:00
Brendan Ragan 1fe355667c reference the pomoroni_i2c.cmake file instead 2022-02-07 18:28:27 +08:00
Brendan Ragan e687fed14b changes for i2c lib 2022-02-05 11:43:01 +08:00
Phil Howard 25bebd888f Use .begin() and .size() as per #213
Correct `I2C::write_bytes` to accept a `const uint8_t*` for the array of bytes.
2022-01-25 18:20:54 +00:00
Phil Howard 7375a208c6 make GAMMA common
Moves the 256 entry GAMMA table into pimoroni_common.

Should probably be added into a library so MicroPython is built with only one instance of the table.
2021-09-13 17:40:51 +01:00
Phil Howard 32e226bfca Add RGBLED and Button libraries
"RGBLED" PWMs 3 pins as a single RGB LED and exposes methods to set the colour via HSV/RGB.

"Button" handles tracking the state and changed state of a single GPIO button, in addition to supporting auto-repeat for held-down buttons.
2021-07-20 15:34:24 +01:00
Phil Howard 6022928517 Fix Pico Explorer SPI for #162
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.
2021-06-05 19:06:11 +01:00
Phil Howard 6a9697145b Reset unused I2C pins to default when an instance is initialised
This change is specifically intended to avoid a pitfall in MicroPython and will likely have no effect in C++.

When using the REPL in MicroPython it's possible to set up an I2C instance on two pins - ie: 20, 21 - and then subsequently realise these are the wrong pins for your board.

Before this change, these pins would be left hanging even if you created a new I2C instance with new pins - ie: 4, 5 - this would lead to communications failures where they really shouldn't happen. Confusing!
2021-05-21 15:01:11 +01:00
Phil Howard 445737088f Switch drivers over to I2C class, tidy up common include
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
2021-05-17 11:46:12 +01:00
Phil Howard 42c7555c96 Add common I2C class
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.
2021-05-14 23:02:38 +01:00
Phil Howard 3dfae2ed5c Add a common header for pins and settings
* 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
2021-05-14 21:55:19 +01:00