Commit Graph

1356 Commits

Author SHA1 Message Date
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 c1619de404 Update text demo to demo more chars 2021-03-29 13:33:48 +01:00
Phil Howard 31b244a43d Use both fonts simultaneously in text demo 2021-03-29 13:33:48 +01:00
Phil Howard 4e8b2f6d1f Drop defunct font_data.cpp from usermods 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
Philip Howard 1fb7dcd358
Merge pull request #103 from pimoroni/Pinkyatacme-disp_enhance
ST7789 refactor + round LCD support
2021-03-29 13:26:53 +01:00
dsssssssss9 5a7d053c62
Create balls_demo.py example (#98)
This is adapted from the demo.py in the examples/pico_display directory.
It now displays full screen on a Pico Explorer
2021-03-29 13:24:50 +01:00
Phil Howard 67b11826b7 Example/test for ST7789 displays 2021-03-29 13:18:31 +01:00
Phil Howard f812e23d8e Cleaner RASET, CASET and MADCTL handling 2021-03-29 13:18:31 +01:00
David Tillotson 43d7e65ee0 Added display.flip to the Micropython code. 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 98b633f31f Correct version of the st7789.cpp driver! 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
Philip Howard 19a084f219
Merge pull request #102 from pimoroni/patch-micropython-changes
Update MicroPython USER_C_MODULES setup
2021-03-23 17:08:55 +00:00
Phil Howard 2ebad4e735 Drop redundant -D 2021-03-23 13:00:01 +00:00
Phil Howard 2c5b708685 Update MicroPython CI to use micropython.cmake 2021-03-23 12:44:31 +00:00
Phil Howard a1125d6e2f Rename usermod.cmake files to micropython.cmake 2021-03-23 12:43:40 +00:00
Philip Howard 9eab4c3934
Merge pull request #100 from pimoroni/patch-ulab-use-upstream
Switch to upstream ulab
2021-03-22 20:48:53 +00:00
Philip Howard d3dd3096e5
Merge pull request #101 from pimoroni/patch-fix-or-suppress-warnings
Fix or suppress warnings
2021-03-22 20:48:42 +00: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
Phil Howard 2d4354a898 Switch to upstream ulab 2021-03-22 16:51:29 +00:00
helgibbons 67457a3c5d Remove references to set_backlight 2021-03-12 11:04:02 +00:00
helgibbons c61937adba Add MicroPython function reference for Pico Explorer 2021-03-12 11:03:16 +00:00
Philip Howard 48994c177f
Merge pull request #88 from pimoroni/patch-include-ulab
Add ulab to included modules
2021-03-09 14:04:52 +00:00
Phil Howard d9a12f8509 Add ulab to included modules
This change submodules in our fork of ulab with an added usermod.cmake and adds it to the top-level usermod.cmake for our shipped modules.

It should - in theory - result in ulab being included in release builds.
2021-03-08 21:23:19 +00:00
Salvatore La Bua 13b94c59c4
Display thermo example Keep last 48 temperatures 2021-03-09 02:16:10 +09:00
Philip Howard 292e2b52af
Merge pull request #68 from pimoroni/driver-vl53l1x
Pico driver for vl53l1x Time of Flight breakout
2021-02-23 15:15:51 +00:00
James Sutton 8383621901
Explorer tga order fix (#65)
* Fixing TGA rendering order from RGB to GBR: http://www.paulbourke.net/dataformats/tga/

Signed-off-by: James Sutton <1068763+jpwsutton@users.noreply.github.com>
2021-02-23 15:15:01 +00:00
Philip Howard 62b869474d
Merge pull request #69 from pimoroni/patch-bouncing-balls
Improved bouncing balls demo
2021-02-23 15:05:30 +00:00
Phil Howard e17aa01f5d Improved bouncing balls demo
Keep the bouncing balls in the court and gives balls a speed in proportion to their size. Created from code in #63

Co-authored-by: Mark Emery <mark@markemerylimited.co.uk>
2021-02-23 12:46:50 +00:00
Phil Howard 25a8c5b8eb Tweak and clean up TOF demo
* Switch to using AutoRepeat class to debounce buttons
* Read TOF sensor non-blocking to avoid stalling input
* Drop dead code
* Make mode_to_text const
* "Hold" text shows red when held
2021-02-23 11:17:14 +00:00
Simon Reap 0166208a52 Pico driver for vl53l1x Time of Flight breakout 2021-02-22 22:02:23 +00:00
Philip Howard 53f3539c3a
Merge pull request #61 from helgibbons/main
Moar examples!
2021-02-16 18:17:00 +00:00
helgibbons 5f1bc6b641 Tweaks to examples 2021-02-16 16:52:48 +00:00
Philip Howard 1ef7cb10ce
Merge pull request #56 from beshrkayali/beshrkayali-patch-1
Minor typo :)
2021-02-16 15:47:21 +00:00
helgibbons 5a6a5b42c1 Update buttons.py 2021-02-16 14:50:11 +00:00
helgibbons 5118339781 Add simple button example for Display and Explorer 2021-02-16 14:43:57 +00:00
helgibbons 8b96198604 add PWM audio example 2021-02-16 12:54:23 +00:00
helgibbons 29dd151923 add links to Display readme 2021-02-16 12:47:19 +00:00
Philip Howard f83aa6bf48
Merge pull request #60 from helgibbons/main
Fixes the example in the MicroPython Display readme and adds a couple of new examples
2021-02-15 19:27:02 +00:00
helgibbons fcfd679e56 fix error in Display readme 2021-02-15 09:24:08 +00:00
helgibbons 15569842e8 add Explorer examples 2021-02-14 18:24:01 +00:00
helgibbons 2f69d22c99 add some more examples 2021-02-14 14:42:51 +00:00
helgibbons 8ac176fe57 fix the example, minor edits 2021-02-14 14:15:51 +00:00