Wykres commitów

407 Commity (main)

Autor SHA1 Wiadomość Data
Phil Howard 602d1b41dd PicoGraphics: Attempt at dither and scanline interrupts.
Currently both unused and both very slow.

Dither may only be feasible for <=8 colour displays.

JPEGDEC will dither to 4-bit greyscale quite happily.
2022-06-13 20:12:03 +01:00
Phil Howard 656d69399a JPEGDEC: Fix dither buffer size 2022-06-13 20:12:03 +01:00
Phil Howard d2b065d2da JPEGDEC: Use 4-bit dither. 2022-06-13 20:12:03 +01:00
Phil Howard 62818a5f49 PicoGraphics: Palettes as RGB, Scanline convert with callback. 2022-06-13 20:12:03 +01:00
Phil Howard 7f0fe44881 JPEGDEC: Move to libraries, use C++, draw into PicoGraphics. 2022-06-13 20:12:03 +01:00
Phil Howard 1a9ebb7b6e PicoGraphics: More pen conversion, better names. 2022-06-13 20:12:03 +01:00
Phil Howard a558d35cab PicoGraphics: Remove last vestiges of template approach. 2022-06-13 20:12:03 +01:00
Phil Howard 49b62515c2 PicoGraphicS: Hershey support, bugfixes, tidyup. 2022-06-13 20:12:03 +01:00
Phil Howard fc1561e54b PicoGraphics: Fix set_framebuffer. 2022-06-13 20:12:03 +01:00
Phil Howard b13470b4fb PicoGraphics: Add set_palette and set_font. 2022-06-13 20:12:03 +01:00
Phil Howard d1b7639e8a PicoGraphics: Update README. 2022-06-13 20:12:03 +01:00
Phil Howard 4848e7ba59 PicoGraphics/ST7789/ST3375: Fixup C++ examples and libraries. 2022-06-13 20:12:03 +01:00
Phil Howard 67f1331b23 ST7789 -> PicoGraphics
* Absorb ST7735 support into the generic ST7789 driver and rename to PicoGraphics
* Delete obsolete MicroPython modules
* Refactor PicoGraphics to inherited class for each pen type
* Refactor ST7789 and ST7735 to derive from DisplayDriver
* Allow user to set pen_type in MicroPython constructor for RGB565, RGB332, P8 and P4 modes
2022-06-13 20:11:49 +01:00
Phil Howard 1a251822f5 ST7735: Update 160x80 LCD to new PicoGraphics<PenRGB565> 2022-06-13 20:11:09 +01:00
Phil Howard 7e4725d1cd ST7789/PicoGraphics: Templated framebuffer formats. 2022-06-13 20:11:09 +01:00
Phil Howard b66da12c1b ST7789/PicoDisplay: Update C++ examples. Rename GenericST7789 -> PicoDisplayST7789. 2022-06-13 20:11:09 +01:00
Phil Howard 65788ae6bf ST7789/PicoGraphics: Faster RGB332 mode lookups.
Replace palette search in RGB332 mode with a simple return of the RGB565 colour packed to RGB332,
since this is identical to its index in the palette.
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 9b8d215cd3 ST7789/PicoGraphics: Update C++ libs and examples. 2022-06-13 20:11:09 +01:00
Phil Howard c13f53092d ST7789/PicoGraphics: Fix palette bugs, add reserve. 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
Phil Howard ef6179e77d ST7789/PicoGraphics: Refactor & make modes more explicit. 2022-06-13 20:11:09 +01:00
Phil Howard 73f73a0ac5 Make colour truncation from 565 to 332 optional 2022-06-13 20:11:09 +01:00
Phil Howard 3f9f28c60b Add measure_text, fixed default palette init 2022-06-13 20:11:09 +01:00
Phil Howard 51ad7edb09 Prefer RGB332, add palette management functions 2022-06-13 20:11:09 +01:00
Phil Howard 7abe4aae7f ST7789: Experimental 8bit framebuffer. 2022-06-13 20:11:09 +01:00
Jonathan Williamson 7f5546f29a Tufty2040: Initial screen bringup. 2022-06-13 20:11:09 +01:00
Phil Howard 83b6331094 Drop obsolete MicroPython binding compat constructors. 2022-05-30 11:52:37 +01:00
Phil Howard f7c42e90a8 ADC FFT library & MicroPython Bindings 2022-05-23 16:12:22 +01:00
Charlie Birks 8be98da0e5
Use float pow for pico unicorn gamma
Looks like that was intended based on the float cast and all the f suffixes...
2022-05-23 14:09:50 +01:00
Charlie Birks a4f91a93ee
Replace int pow(2, x) in pico unicorn
Using double pow here seems a bit inefficient (even if it's init code)
2022-05-23 14:07:31 +01:00
Charlie Birks b9a8c0a536
Make global variables static in pico unicorn 2022-05-23 14:04:00 +01:00
Philip Howard db60553322
Merge pull request #327 from pimoroni/feature/merged-st7789
ST7789: Create generic display driver
2022-05-18 13:37:56 +01:00
Phil Howard 8a68015eac ST7789: Update README.md 2022-05-18 11:55:02 +01:00
Phil Howard 8e1e9df002 ST7789: Refactor and Bugfixes
* Make ST7789 accept only full config with SPI pins
* Make Generic ST7789 wrapper library handle "slot"
* Update Round LCD and 240x240 Square LCD
* Remove Python Round LCD and 240x240 LCD modules (we need the space!)
* Remove C++ Round LCD and 240x240 LCD libraries (they're a little redundant!)
* Fix garbage collected framebuffer bug in Python ST7789
* Deprecate "flip" in favour of "configure_display"
* Tidy up ST7789, remove dead/unused/commented code
2022-05-12 18:58:33 +01:00
ZodiusInfuser 305462d33c
Merge branch 'main' into motor-and-encoder 2022-05-12 17:02:50 +01:00
Phil Howard 65fb478b6e ST7789: Port C++ examples to generic driver. 2022-05-12 16:02:56 +01:00
Phil Howard 1315af4e41 PicoDisplay: Use pins for buttons.
Swap the button constants to use pins, just in case someone tries to use these with Button() or PicoZero.
2022-05-12 12:44:00 +01:00
Phil Howard 813b7a401a ST7789: Support rotation for PD and PD2. 2022-05-12 12:04:55 +01:00
ZodiusInfuser 15e5eaa890 Finished C++ examples and tweaked MP examples 2022-04-28 21:23:18 +01:00
ZodiusInfuser 415a1e559a Setup and partial implementations of C++ examples 2022-04-26 23:15:13 +01:00
ZodiusInfuser 652612fc31 Removed old C++ motor implementation 2022-04-22 13:59:40 +01:00
ZodiusInfuser 8ef0d33f0c Finalised more examples 2022-04-20 18:55:39 +01:00
ZodiusInfuser 180df9e085 Merge branch 'motor-pio' into motor-and-encoder 2022-04-19 16:28:12 +01:00
Luyáš Říha 746b47a601 fix micropython breakout_roundlcd rendering of graphics primitives 2022-04-18 20:40:05 +02:00
ZodiusInfuser c113f30da6 Changed the motor implementation on PicoExplorer to used breaking mode 2022-04-13 10:47:42 +01:00
ZodiusInfuser 96070f61af Started on motor readme, and updated API elements accordingly 2022-04-12 17:00:39 +01:00
ZodiusInfuser ac3edafbf4 Contined motor dev 2022-04-05 16:53:36 +01:00
ZodiusInfuser 9a9c3832a2 Various motor work 2022-04-04 20:00:03 +01:00
Philip Howard dbb9a3d181
Merge pull request #332 from pimoroni/feature/unicode-ish
Fonts: Ungracefully handle accented characters.
2022-04-01 16:26:31 +01:00
Phil Howard 3b8740fab6 Bitmap Fonts: Add letter spacing. 2022-04-01 15:38:48 +01:00
Phil Howard 0d43973326 Bitmap Fonts: Refactor and support for pound/degrees. 2022-04-01 15:38:42 +01:00
Phil Howard b2ff46b516 Bitmap Fonts: Simplify and add support for 16bit fonts. 2022-04-01 15:38:34 +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
Mike Bell a4acf4b94e Fix buffer overrun on out of bounds rectangle height/width 2022-03-30 22:23:09 +01:00
ZodiusInfuser e59bdc34c4 Added initial structure of new motor classes 2022-03-30 15:50:12 +01:00
ZodiusInfuser 8a36102c53 Merged in old motor implementation 2022-03-30 15:50:12 +01:00
Phil Howard 348b90225f Badger 2040: Avoid sub 1 scale vanishing pixel font text. 2022-03-30 15:10:52 +01:00
Phil Howard 40d3c9e0be Badger2040: Use bitmap measure functions. 2022-03-30 15:10:52 +01:00
Phil Howard 90ea262496 Bitmap Fonts: Add measure functions. 2022-03-30 15:10:52 +01:00
Phil Howard 3b8dcecd8e Pico Graphics: Move bitmap fonts into generic library.
* Add bitmap font support into Badger 2040
2022-03-30 15:10:52 +01:00
Phil Howard 24819734b7 Separate Hershey Fonts into their own library. 2022-03-30 15:10:52 +01:00
ZodiusInfuser 41d55b1115 Ported the majority of Servo2040 MP examples to C++ 2022-03-30 14:29:02 +01:00
ZodiusInfuser f46deb1c5b Ported the majority of Servo2040 MP examples to C++ 2022-03-30 14:29:02 +01:00
ZodiusInfuser e4bb26b081 Renamed LED_DAT to LED_DATA 2022-03-30 14:29:02 +01:00
ZodiusInfuser aeb9705d15 Moved common PWM and MultiPWM out of servo driver, and renamed to cluster 2022-03-30 14:29:02 +01:00
ZodiusInfuser f5836e56df Raised servo functions to a base class, and added ServoCluster which uses the PIO PWM. 2022-03-30 14:28:17 +01:00
ZodiusInfuser 2e58841b5e Started a hardware PWM servo class, with calibration support 2022-03-30 14:28:17 +01:00
ZodiusInfuser aca98ca747 current WIP code for PIO based PWM 2022-03-30 14:28:17 +01:00
Mike Bell 5b6c220e2a Actually use full screen image process, and fix it 2022-03-29 23:16:18 +01:00
Mike Bell b1dddff291 Badger2040: Fix rectangle handling for thickness, use fast draw for dithered rectangle 2022-03-29 23:16:18 +01:00
Mike Bell d96a584ddd Badger2040: Improve performance of some large frame buffer writes 2022-03-29 23:15:43 +01:00
Philip Howard 66254ab743
Merge pull request #312 from deodre/patch-wireless-include-drivers
Updated path to esp32 drivers in /libraries/pico_wireless/pico_wireless.cmake
2022-03-29 14:12:21 +01:00
Phil Howard b1fd8936cf Badger2040: Enforce minimum update blocking time. 2022-03-25 10:57:30 +00:00
Mike Bell fe943a05f7 Include USER button in button state 2022-03-24 23:24:10 +00:00
Teodor Cervinski 58ae6edb24 Updated path to esp32 drivers in /libraries/pico_wireless/pico_wireless.cmake 2022-03-23 11:34:52 +02:00
Phil Howard 249f54fae4 ST7789: Create generic display driver for #299 2022-03-21 17:02:46 +00:00
Phil Howard 39e9728b0e Badger2040: Fix text rotation aliasing for #290
Fix text rendering at 90, 180 and 270 degree rotations by avoiding float -> int truncation.
2022-03-11 13:48:41 +00:00
Mike Bell 6975610fdc Don't use wait_for_press because that waits for the button to be released 2022-03-09 23:53:56 +00:00
Mike Bell fefa6f8880 Change internal state of Badger2040 to protected 2022-03-09 23:47:12 +00:00
Mike Bell bbb995a062 Reboot on button press when halted but still have power 2022-03-09 23:32:52 +00:00
Mike Bell d26bb1701c Minor fixes to Badger2040 library 2022-03-02 21:08:17 +00:00
Phil Howard f90559ed41 Badger2040: Add support for colour inverted mode 2022-02-25 14:49:28 +00:00
Phil Howard 2c27296cc4 Badger2040: Add image & icon support 2022-02-25 11:08:32 +00:00
Jonathan Williamson e69115ea2e added new meaasure_text() and measure_glyph() methods 2022-02-25 11:08:32 +00:00
Phil Howard a4f7d05fe5 Badger2040: Move startup block on held buttons to launcher.py
Blocking on held buttons is bad for MicroPython, since it makes nothing happen on startup-
We need the button to be held but are waiting for a button release after some arbitrary amount of time.

Additionally running code while holding down a button would block normal MicroPython event execution and crash the host's USB bus quite severely.
2022-02-25 11:08:32 +00:00
Phil Howard 6ff5c39c1b Badger2040: Bugfixes, danger LUTs, examples 2022-02-25 11:08:32 +00:00
Phil Howard 669e96598d Badger2040: Fix input handling
Fixes input handling by clearing the button states to 0 when "wait_for_press".
2022-02-25 11:08:32 +00:00
Jonathan Williamson 07c62a849a added rotation by angle in degrees to text() and glyph() methods 2022-02-25 11:08:32 +00:00
Phil Howard a38dc98199 Badger2040: Comment out meh fonts 2022-02-25 11:08:32 +00:00
Phil Howard af230b5fd5 Badger2040: Refactor to fix MicroPython issues
Move busy wait logic into MicroPython bindings so that MICROPY_EVENT_POLL_HOOK can be called.
2022-02-25 11:08:32 +00:00
Phil Howard 5b084c1b9a Badger2040: Add Fast/Slow LUTs, bugfix and tinkering helpers 2022-02-25 11:08:32 +00:00
Phil Howard 5a0fe00149 Badger2040: Fix typo, comment out explodey wfi 2022-02-25 11:08:32 +00:00
Phil Howard 0a0aecf3f7 Badger2040: Set pull-down on inputs 2022-02-25 11:08:32 +00:00
Phil Howard 46d54072ce Badger2040 MicroPython bindings 2022-02-25 11:08:32 +00:00
Phil Howard 5f52626a4f Add partial update support 2022-02-25 11:08:32 +00:00
Jonathan Williamson ad0ebee16b added image demo for badger2040 2022-02-25 11:08:31 +00:00
Jonathan Williamson f7d61b587a added support for badger2040 2022-02-25 11:08:31 +00:00
Phil Howard 520757d14b Fix code example for #229 2022-01-26 10:07:17 +00:00
Phil Howard 9fddf89111 Remove set_backlight from TOC for #92 2022-01-26 09:50:37 +00:00
Chris Blume 9e788f7379 Correct Pico Display 2 baud
The Pico Display 2 example specifies a baud of 74 * 1000 * 1000.
However, the highest baud the Raspberry Pi Pico can achieve is
62,500,000.

I checked and even when the baud of 74 * 1000 * 1000 is specified,
it ends up using the max that the Raspberry Pi Pico can handle anyway.

This commit removes the incorrect baud parameter, using the default
parameter instead.
2021-12-02 11:42:29 -08:00
Philip Howard 1a9e2802fe
Merge pull request #206 from pimoroni/driver/pwm3901
C++ and MP drivers and examples for Optical Flow sensors
2021-10-06 11:19:29 +01:00
Phil Howard efdc05805f Drop redundant library and example 2021-09-08 13:56:03 +01:00
ZodiusInfuser 9906fdec38 C class and MP bindings for PicoDisplay2 2021-09-08 13:56:03 +01:00
Phil Howard 9ba3a6cfab 320x240 LCD library + tweaks to ST7789 driver
Add the init required for the 320x240 2.0" LCD.

Add an option to set baudrate, 320x240 needs 74MHz for 60FPS

Add library and example for 320x240 2.0 LCD.
2021-09-08 13:55:57 +01:00
ZodiusInfuser 77f082a984 Initial setup for PMW/PAA flow sensor 2021-09-07 16:23:32 +01:00
Phil Howard ab3951cd15 Pico Unicorn: fix MP soft reset & cleanup
* Enhance the soft reset guard to properly reinitialise the PIO/DMA and resume display operation
* Remove dead code and debug pin wiggle.
2021-08-26 21:58:37 +01:00
ZodiusInfuser 0faa312358 Updated micropython example to use working submodule 2021-08-19 15:16:40 +01:00
ZodiusInfuser 3d34d70722 Removed unneeded statics 2021-08-19 14:22:43 +01:00
ZodiusInfuser 8e763f5efe Added a plasma2040 namespaces 2021-08-19 14:12:56 +01:00
ZodiusInfuser 823729dc24 Move apa and ws PIO into drivers so they can be easily used with more boards 2021-08-19 13:40:46 +01:00
ZodiusInfuser 64e6d248d5 Updated rainbow example to be consistant across languages 2021-08-19 12:58:13 +01:00
Phil Howard 6ce80cd289 Plasma WS2812: Add RGBW and color-order support 2021-08-02 14:37:07 +01:00
Phil Howard 693e84c73d Allow uP allocated buffer for Plasma LEDs 2021-08-02 14:37:07 +01:00
Phil Howard 596fb55a57 Add "plasma" MicroPython module
Includes "WS2812" and "APA102" modules, wrapping the libraries.

Uses a destructor to clean up the LED strip and resources when MicroPython is stopped/restarted.
2021-08-02 14:37:06 +01:00
Phil Howard 815e784625 Plasma 2040 library & examples
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.
2021-08-02 14:36:01 +01:00
Phil Howard b80b714c4f BH1745 MicroPython bindings & example 2021-07-30 12:41:06 +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 77839e2a6a Tidy up constructors, drop unused variables, const single addr
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.
2021-05-17 14:50:49 +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
ZodiusInfuser f2ee2a4f8d Better solution to keywords and constructors. Just for I2C for now 2021-05-14 17:14:07 +01:00
ZodiusInfuser 09fc7ca4a7 Added MP address printout for supported breakouts 2021-05-14 15:14:47 +01:00
ZodiusInfuser 80eddb24c7 Updated RV3028 driver to our coding style and included a standalone C example 2021-05-14 13:15:08 +01:00
Phil Howard 0c34de23f5 Tidy up include paths 2021-05-14 12:49:48 +01:00
Phil Howard fd3ef973b6 Fix MICS6814 heater enable, improve demo 2021-05-14 12:41:46 +01:00
ZodiusInfuser 4b850b9290 Added micropython examples for Pot and Enc 2021-05-14 12:41:46 +01:00
ZodiusInfuser d4ba1d97d9 Switch C++ to use Direction enum for functions and added Direction contants to MP 2021-05-14 12:41:46 +01:00
ZodiusInfuser 42f2bff6c7 Fixed pot read from returning bool to returning a float, and removed read_as_percent for read_raw 2021-05-14 12:41:46 +01:00
ZodiusInfuser 31edcf8f93 Renamed IOE's set_addr method to set_address 2021-05-14 12:41:46 +01:00
ZodiusInfuser fd38343924 Micropython bindings for MICS breakout 2021-05-14 12:41:45 +01:00
ZodiusInfuser 05af3e86ba Renamed IOExpander and added Pot, Enc, and MICS specific classes 2021-05-14 12:40:33 +01:00
ZodiusInfuser acf011bba2 Merge in previous Nuvoton driver code 2021-05-14 12:40:33 +01:00
Philip Howard e26677f81a
Merge pull request #148 from pimoroni/patch-better-include-paths
Remove relative include paths
2021-05-14 10:36:19 +01:00
Jonathan Williamson f211fe67e6 Added MSA301 driver, library, and example 2021-05-14 10:01:29 +01:00
Phil Howard 37cac5940b Remove relative include paths
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
2021-05-13 12:06:01 +01:00
Phil Howard 6afbc2e64c AS7262 driver
Co-authored-by: ZodiusInfuser <christopher.parrott2@gmail.com>
2021-05-12 16:04:50 +01:00
Philip Howard 5d27dbc711
Merge pull request #137 from pimoroni/driver/st7789
C++ and MP support and example for 1.3" LCD breakout
2021-05-10 08:59:19 +01:00
Philip Howard 5a60c477ac
Merge pull request #121 from graeme-winter/set-pixels-as-image
Set pixels as image, add show_bitmap_1d(), show_text()
2021-05-07 14:26:33 +01:00
ZodiusInfuser 16106d5596 Micropython bindings for ColourLCD and minor tweaks for ST7789, and RoundLCD 2021-05-07 13:48:51 +01:00
ZodiusInfuser 2be5b11c42 Micropython bindings for small ColourLCD and ST7735 2021-05-07 11:10:47 +01:00
Simon Reap 62e085e81c SGP30 driver for Raspberry Pico
Co-authored-by: ZodiusInfuser <christopher.parrott2@gmail.com>
2021-05-06 10:01:19 +01:00
ZodiusInfuser 3f379d04e7
C++ and MP support and example for LTR559 breakout (#135)
* C driver and example for LTR559 breakout
* Micropython bindings and example for LTR559
2021-05-06 09:48:17 +01:00
ZodiusInfuser 7d3eb60b33
C++ and MP support and example for Trackball breakout (#134)
* C and Micropython bindings for trackball
* C and Micropython examples for trackball
2021-05-04 22:29:53 +01:00
Philip Howard eee621db13
Merge pull request #131 from pimoroni/patch-is31fl3731
Recover the initialisation patch for is31fl3731
2021-05-04 10:35:24 +01:00
ZodiusInfuser 69ba1c88ef
C++ and MP support and examples for Dotmatrix breakout (#133)
* 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>
2021-05-04 10:34:52 +01:00
Phil Howard 5c785af983 Fix lookup table int type 2021-04-23 10:13:40 +01:00
Phil Howard 8a15da1f66 Move scroll_text, show_text, bitmap_1d and set_pixels into C++ library
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.
2021-04-22 20:00:25 +01:00
Phil Howard 91bf9be9f0 IS31FL3731 for RGBMatrix5x5 and Matrix11x7
Add IS31FL3731 driver
Add RGBMatrix5x5 library and example
Add Matrix11x7 library and example

Co-authored-by: ZodiusInfuser <christopher.parrott2@gmail.com>
2021-04-22 17:29:37 +01:00
Philip Howard 7776536d83
Merge pull request #126 from pimoroni/pico-wireless
C++/MicroPython Support & Examples for Pico Wireless
2021-04-22 13:40:59 +01:00
Phil Howard b3df1483c1 Add breakout-garden SPI slot selection for ST7789 displays
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.
2021-04-19 17:22:56 +01:00
ZodiusInfuser 15ccd8f001 Added digital_read and analog_read functions 2021-04-19 16:44:11 +01:00
ZodiusInfuser 8ff49474ea Progressed on Wifi class, adding IPAddress 2021-04-15 10:11:16 +01:00
ZodiusInfuser e5545c1c02 Added latest local code for wireless pack 2021-04-15 10:11:16 +01:00
ZodiusInfuser 848aa19c2c Added micropython support and example for roundlcd breakout 2021-03-30 15:15:13 +01:00
ZodiusInfuser 0866ade054 Created dedicated library class for round LCD breakout 2021-03-30 13:51:00 +01:00
Philip Howard d88f659b29
Merge pull request #91 from helgibbons/main
Add MicroPython function reference for Pico Explorer
2021-03-29 13:47:00 +01:00
Phil Howard 6b86c5618c Reduce size of space slightly for tighter text 2021-03-29 13:33:48 +01:00
Phil Howard 879bb673f5 Drop £ from text demo
£ is not an ASCII character and resulted in out of range mystery memory garbage being displayed.
2021-03-29 13:33:48 +01:00
David Tillotson b2027de7fc Correct version of the 6x8 font data! 2021-03-29 13:33:48 +01:00
Phil Howard 6c566992d4 Add set_font to docs 2021-03-29 13:33:48 +01:00
Phil Howard 276528c119 Make font settable by user at runtime
This allows fonts to be hot-swapped out by calling `set_font`

Unfortunately the way fonts are currently stored limits the maximum height to 8 pixels, since that's the size of a uint8_t and the y dimension is bitwise encoded.

The width can be arbitrary, by specifying the widths and max_width (the multiplier for number of bytes per char).

Might be worth grabbing some more bits from 32blit to make this not terrible, but now a user-defined font is an .hpp and a `set_font` away.
2021-03-29 13:33:43 +01:00
David Tillotson 0e24aae2eb Added the font_height as well (Oops!) 2021-03-29 13:27:25 +01:00
David Tillotson dc14cf3353 Added example 6x8 font - rename font_data8.cpp to font_data.cpp to
switch to this font.
2021-03-29 13:27:25 +01:00
David Tillotson 4cecb920bf Adjusted font_data in graphics lib code to enable different height fonts 2021-03-29 13:27:25 +01:00
Phil Howard 67b11826b7 Example/test for ST7789 displays 2021-03-29 13:18:31 +01:00
David Tillotson 1993d403e5 Added portrait mode (building with the work from hamid-elaosta:portrait) 2021-03-29 13:18:31 +01:00
David Tillotson baf16fc332 And the correct version of pico_display.cpp! 2021-03-29 13:18:31 +01:00
David Tillotson 237d59d1d1 Slight efactor of st7789 driver, and addition of the flip function 2021-03-29 13:18:31 +01:00
Phil Howard 675106ece4 Patch or suppress warnings
The upstream MicroPython rp2 port has re-enabled -Werror so we need to either fix warnings or,
in the case of those generated by C++/C MicroPython binding weirdness, suppress them.
2021-03-22 20:43:23 +00:00
helgibbons 67457a3c5d Remove references to set_backlight 2021-03-12 11:04:02 +00:00
ZodiusInfuser 9c65df1540 Removed set_backlight from PicoExplorer, as the board does not have backlight control 2021-02-11 16:51:53 +00:00
David Tillotson 7db3bcfa15
Corrected minor typos in README.md for the display libs (#42) 2021-02-09 14:01:58 +00:00
Philip Howard 2a7f8f4781
Documentation (#5)
* Add Pico Display README
* Add PicoGraphics README
* Add Pico Explorer README
* Pico Display Python README
* Add Pico Unicorn demo.py
* Add Pico Unicorn MicroPython docs
* Add Pico Unicorn C++ README
* Add Pico RGB Keypad README
2021-01-27 09:36:08 +00:00
lowfatcode 032c17dd00
temporary fix to avoid micropython locking up on subsequent runs with unicorn (#22)
Co-authored-by: Jonathan Williamson <jon@pimoroni.com>
2021-01-24 21:14:44 +00:00
Philip Howard 356a8857c7
align bitstream for 32bit dma transfer and fix ghosting issue (#13)
Co-authored-by: Jonathan Williamson <jon@pimoroni.com>
2021-01-24 14:58:48 +00:00
Philip Howard 7d4ca4a86b
Graphics Enhancements (#8)
* typedef pen and constexpr create_pen for #6

* Prevent out of bounds clip permitting write outside buffer

* camelcase rect, point, and pen types

* added triangle(p1, p2, p3) and polygon(std::vector<Point> points) methods to graphics library

* change all uses of pen that were uint16_t into Pen type

* updated micropython modules to use new rect, point, pen naming

* added line(p1, p2) method to pico graphics library with faster vertical/horizontal special cases

Co-authored-by: Jonathan Williamson <jon@pimoroni.com>
2021-01-23 23:41:09 +00:00
Philip Howard 51d95db154
Add gpio.h to work around N_GPIOs bug (#16) 2021-01-23 23:39:32 +00:00
Jonathan Williamson 2e743ca302 request an available sm instead of defaulting to 0 2021-01-23 16:46:15 +00:00
Phil Howard 1d845374f7 Add cmake files for other libraries 2021-01-22 14:33:17 +00:00
Phil Howard 6a13dc5c4b Include gpio.h to fix undefined N_GPIOS 2021-01-22 14:03:38 +00:00
Phil Howard 8dae215552 Add .cmake files to support out-of-tree projects 2021-01-22 14:03:38 +00:00
Jonathan Williamson ede389d7af introduction to the pico display pack library 2021-01-22 08:21:14 +00:00
Jonathan Williamson 82347bc276 Merge branch 'main' of github.com:pimoroni/pimoroni-pico into main 2021-01-21 18:42:01 +00:00
ZodiusInfuser 9a8bcc9f8a Fixed issue with clear of picoscroll not working under mpy, and added demo 2021-01-21 16:56:04 +00:00
ZodiusInfuser 1b2d2faad5 Added mpy wrapper for pico_explorer 2021-01-21 00:52:33 +00:00
Phil Howard 4f6691be8b Very messy attempt at using a bytearray as the buffer 2021-01-20 21:39:09 +00:00
ZodiusInfuser 84e98b7040 Completed mpy wrapper for pico_display, and included example 2021-01-20 21:05:07 +00:00
ZodiusInfuser 75560ea038 Added outline of an mpy wrapper for pico_display 2021-01-20 15:59:48 +00:00
Jonathan Williamson 4846240daa Merge branch 'main' of github.com:pimoroni/pimoroni-pico into main 2021-01-20 06:00:37 +00:00
Jonathan Williamson f0bbcd2f86 change channel gamma 2021-01-20 06:00:30 +00:00
ZodiusInfuser 87acbfa5f8 Changed positioning of some include lines 2021-01-19 18:56:53 +00:00
ZodiusInfuser a90edb8041 Added mpy wrapper for pico_unicorn 2021-01-19 18:46:53 +00:00
ZodiusInfuser 60c69c2a1f Added mpy wrapper for pico_scroll 2021-01-19 18:43:43 +00:00
ZodiusInfuser 7103377575 Added c++ code and mpy wrapper for pico_rgb_keypad, with examples 2021-01-19 18:40:51 +00:00
Jonathan Williamson ded4087db4 perform updates via repeated dma transfer instead of blocking writes to the pio fifo 2021-01-19 07:09:58 +00:00
Jonathan Williamson 944355f060 updated demos/test, added clear() method to unicorn 2021-01-18 08:59:13 +00:00
Jonathan Williamson 8345197a83 add support for clipping rectangles to graphics libary, add point and rect types 2021-01-18 07:58:19 +00:00
Jonathan Williamson b659709f5a Added audio tone and motor functions to PicoExplorer library and demo 2021-01-17 09:18:58 +00:00
Jonathan Williamson 96d702ef9a PicoExplorer library and example, basic text support for PicoGraphics 2021-01-17 07:41:25 +00:00
Jonathan Williamson 447eca6bb3 pico scroll library and example 2021-01-16 16:38:58 +00:00
Jonathan Williamson 97706e86df moved examples into their own directory, moved pico support code into libraries directory, fixed cmake configuration 2021-01-16 16:00:15 +00:00
Jonathan Williamson 9f31765c98 Setup libraries and drivers correctly for CMake 2021-01-16 15:02:18 +00:00
Jonathan Williamson 90d3ab8178 pico display driver 2021-01-16 12:26:03 +00:00