PicoSystem libraries and examples.

Overview

PicoSystem libraries and examples

PicoSystem is a pocket sized handheld games console, built around Raspberry Pi's RP2040 chip (that's the little fella that's the core of a Raspberry Pi Pico).

We've taken these lucky bits of silicon to the component spa and treated them to the full works: a big chunk of flash memory, a vibrant 240x240 screen and a nice D-pad and buttons picked out by our most particular arcade enthusiasts. There's also a piezo speaker for discreet retro bleeps and chirps and a rechargeable LiPo battery so you can take your homebrew games on the bus.

MicroPython

We also provide a custom MicroPython image for PicoSystem which provides support for this API. Visit our MicroPython PicoSystem documentation for more details.

C++ API

This is the source code and documentation for the PicoSystem C++ API. It is intentionally designed to be lightweight and get out of your way when you're developing games for PicoSystem.

The entire API is exposed as around 40 functions which provide access to the hardware and help with drawing, audio, and user input.

Once you're comfortable with building your project for PicoSystem you may find our PicoSystem C++ API Cheatsheet a useful reference to keep open.

Getting started

First things first! You must install Raspberry Pi's Pico SDK following the instructions they provide.

Then to setup the PicoSystem API simply follow these steps:

  1. Create a directory to store the PicoSystem code and navigate into it
cd ~
mkdir picosystem
cd picosystem
  1. Clone this repository
git clone [email protected]:pimoroni/picosystem.git
  1. Create a build folder and build the examples
mkdir build
cmake ..
make -j8

You will now have the examples built in ~/picosystem/build/examples for example ~/picosystem/build/examples/snake/snake.uf2. This file can be dropped onto your PicoSystem when in DFU mode.

Booting PicoSystem into DFU mode

Hold down the X action button and toggle the power. PicoSystem will boot into DFU mode and appear as a disk on your computer.

Simply drag a .uf2 file onto the PicoSystem disk and it will be uploaded and launch immediately.

Example CMakeLists.txt

If you're building your own out-of-tree project you'll need to include and import the pico_sdk_import.cmake file, as per regular Pico SDK setup instructions.

cmake_minimum_required(VERSION 3.12)

# Pull in PICO SDK (must be before project)
include(../../pico_sdk_import.cmake)

project(snake C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)

# Find the PicoSystem SDK
find_package(PICOSYSTEM REQUIRED)

# Set up your project and sources
picosystem_executable(
  my_project
  my_source_file.cpp
)

# Example build options
pixel_double(my_project)
disable_startup_logo(my_project)

Build options

There are a few options you can set in your project to change the behaviour of PicoSystem.

These can be set by adding one of the following lines in your CMakeLists.txt:

  • pixel_double(NAME): set resolution to 120x120 for a retro chunky pixel aesthetic (and significant RAM saving)
  • no_spritesheet(NAME): do not include the default sprite sheet (saves 32kB of RAM)
  • no_font(NAME): do not include the default font (saves 1kB)
  • disable_startup_logo(NAME): disables the PicoSystem statrtup logo animation
  • no_overclock(NAME): disables overclocking of the RP2040 (by default we set it to 250MHz)

In all cases NAME should be the name you supplied to picosystem_executable.

Compiler flags

If you need them, the build options are also available as compiler flags:

  • -DPIXEL_DOUBLE: set resolution to 120x120 for a retro chunky pixel aesthetic (saves 84kB of RAM)
  • -DNO_SPRITESHEET: do not include the default sprite sheet (saves 32kB of RAM)
  • -DNO_FONT: do not include the default font (saves 1kB)
  • -DNO_STARTUP_LOGO: disables the PicoSystem startup logo animation
  • -DNO_OVERCLOCK: disables overclocking of the RP2040 (by default we set it to 250MHz)

General Information

Hardware

  • Powered by RP2040 (Dual Arm Cortex M0+ with 264kB of SRAM)
  • 16MB of QSPI flash supporting XiP
  • 1.54" colour SPI IPS LCD (240x240 and 120x120 modes)
  • D-pad and buttons
  • 525mAh LiPo battery (6hrs+)
  • Piezo buzzer/speaker
  • On/off power button
  • RGB LED
  • Programmable and rechargeable via USB-C (cable not included)

Graphics modes

PicoSystem supports two graphics modes.

  • 240x240: the native resolution of the LCD
  • 120x120: pixel doubled mode (saves RAM)

Generally pixel art will look best in the pixel doubled mode (with the added bonus that you'll save a lot of RAM!). Projects that use vector art (think asteroids) will benefit from the native mode.

Both modes are 16 bits per pixel with 4 bits per channel (red, green, blue, alpha). This gives a total of 4,096 possible colours and 16 different levels of transparency.

Issues
  • Attempt at naming the remaining sprites

    Attempt at naming the remaining sprites

    I couldn't really work out what all of 'em were supposed to be, but I did my best to guess.

    Ref: #8

    I pinged the creator on their twitter and itch page for this spritesheet. I'll keep this in draft a couple of days to give 'em a chance to have a look if they're interested. Though, even without Sam's help, "most names" is better than "half the names".

    Reference img: image

    opened by Fordi 11
  • cmake Error when building per README

    cmake Error when building per README

    Trying to build per the README on macOS. I have the pico SDK and build tools set up correctly (I think) but am getting a cmake error

    CMake Error at examples/snake/CMakeLists.txt:10 (find_package):
    By not providing "FindPICOSYSTEM.cmake" in CMAKE_MODULE_PATH this project
    has asked CMake to find a package configuration file provided by
    "PICOSYSTEM", but CMake did not find one.
    
    Could not find a package configuration file provided by "PICOSYSTEM" with
    any of the following names:
    
    PICOSYSTEMConfig.cmake
    picosystem-config.cmake
    
    Add the installation prefix of "PICOSYSTEM" to CMAKE_PREFIX_PATH or set
    "PICOSYSTEM_DIR" to a directory containing one of the above files.  If
    "PICOSYSTEM" provides a separate development package or SDK, be sure it has
     been installed.
    

    I can fix this manually by running cmake build flag -DPICOSYSTEM_DIR:PATH=/Users/NAME/picosystem (path set to root of where I cloned the repo) . This solves the issue and I can build the examples and run on the system. I am not sure whether or how to make changes to the CMakeLists.txt file to solve this at the root.

    Happy to close if this is user error on my end :) .

    opened by mintakka 7
  • Screen flashes with noise during boot

    Screen flashes with noise during boot

    When booting with disable_startup_logo(<project_name>) in CMakeLists.txt the screen briefly flashes with RGB noise during boot. This does not happen if disable_startup_logo(<project_name>) is omitted.

    bug 
    opened by dagwoodland 4
  • PicoSystem SDK port for MicroPython.

    PicoSystem SDK port for MicroPython.

    Requires PIMORONI_PICOSYSTEM board type with a custom root pointer. Available here: https://github.com/pimoroni/micropython/tree/board/rp2/pimoroni_picosystem

    TODO:

    • [ ] Include ulab?
    • [x] Sound!
    • [x] Update examples to omit "import picosystem" and "init()"
    • [ ] Add a default message when powered on (go here for help, connect to your computer to program or whatnot)
    • [ ] Customise bootsplash for MicroPython
    • [x] More examples!

    Testing

    CI Builds

    You can grab beta builds from the CI artifacts. Eg: :arrow_right: :arrow_right: :arrow_right: https://github.com/pimoroni/picosystem/suites/4086239197/artifacts/104054214 :arrow_left: :arrow_left: :arrow_left:

    Tips:

    • Use Thonny to write your own codes
    • Hold A during boot to launch the shapes example

    Build from source

    These instructions may be a bit patchy, YMMV!

    git clone https://github.com/pimoroni/picosystem
    git clone https://github.com/pimoroni/micropython -b board/rp2/pimoroni_picosystem
    cd micropython
    git submodule update --init
    cd lib/pico-sdk
    git submodule update --init
    cd ../../micropython/mpy_cross
    make
    cd ../ports/rp2
    cp ../../../picosystem/micropython/modules_py/boot.py modules/
    make USER_C_MODULES=../../../picosystem/micropython/modules/micropython.cmake BOARD=PIMORONI_PICOSYSTEM
    cp build-PIMORONI_PICOSYSTEM/firmware.uf2 /path/to/RPI-RP2/
    

    Find firmware.uf2 in build-PIMORONI_PICOSYSTEM

    opened by Gadgetoid 3
  • MicroPython - Can't draw to offscreen buffer and blit buffer to screen

    MicroPython - Can't draw to offscreen buffer and blit buffer to screen

    Open the REPL and run:

    >>> b=Buffer(120,120)
    >>> target(b)
    >>> sprite(0,20,20)
    >>> target()
    >>> blit(b,0,0,120,120,0,0)
    >>> flip()
    

    Would be useful for tile maps or backgrounds where you don't want to redraw multiple sprites/text/shapes every tick. Instead draw to a buffer once and then blit the buffer to the screen every tick

    opened by aiecee 2
  • Move pre-initialized counter to last item in struct

    Move pre-initialized counter to last item in struct

    voice() in utility.cpp doesn't initialize .ms, and non-trivial (in this case, out-of-order) initializers aren't supported by the buildchain. This PR puts it at the end (which is fine, since it's pre-initialized anyway), unbreaking the build.

    opened by Fordi 2
  • Added (back) the missing playing() function

    Added (back) the missing playing() function

    Looks like jon's tidyup of the audio API (https://github.com/pimoroni/picosystem/pull/63) kept the prototype of playing() but lost the actual implementation.

    There's an argument that because position() now does more of the work that the function is redundant, but we should either have function + prototype, or neither - not just one of them :-)

    opened by ahnlak 1
  • picosystem SDK uses default pico SDK memory map

    picosystem SDK uses default pico SDK memory map

    (At least) when installed according to instructions, the picosystem SDK builds using the default pico SDK memory map (pico-sdk/src/rp2_common/pico_standard_link/memmap_default.ld).

    This specifies 2k of flash:

     MEMORY
     {
        FLASH(rx) : ORIGIN = 0x10000000, LENGTH = 2048k
    
    

    This limits the .rodata section of ELF files to 2M of memory. This limitation seems to come from the standard Pi Pico. However, Picosystems have a 16 MB flash memory which can hold much more. Bumping up the length to e.g. 8192k (or more, up to 16384k I guess) allows building much larger projects.

    This is especially important when #include'ing bitmaps, sprites or similar. It would be super nice if the picosystem SDK shipped with a custom memory map which fixes this problem.

    Tested: up to 8192k seems to be working just fine. ELF files with e.g. ~3.8 MB of .rodata usage just work after the flash length is edited to accommodate.

    Workarounds: I suppose it's possible, though much less convenient, to manually attach binary data at the end of a UF2 file (or directly on the device) with picotool or equivalent.

    bug 
    opened by og-syn 1
  • Added audio_playing() function

    Added audio_playing() function

    Added a convenience function to be able to easily tell if the current note is still playing; essentially wrapping what the audio example does into the API.

    opened by ahnlak 1
  • `text()` without `width` argument causes hard-lock

    `text()` without `width` argument causes hard-lock

    This can be reproduce in MicroPython by attempting to draw any text string wider than the screen without supplying a wrap width. Internally wrap defaults to -1 and this probably causes terrible things to happen.

    opened by Gadgetoid 1
  • SDK: Refactor game loop, add stats.

    SDK: Refactor game loop, add stats.

    Refactor game loop

    Add stats for FPS, idle-time %, last full tick time, update()/draw() call time in ms.

    TODO:

    • [x] Update MicroPython game loop
    • [x] Add Stats to MicroPython bindings
    • [x] Update template
    opened by Gadgetoid 1
  • MicroPython: Revert to vanilla module, build without MPY hacks.

    MicroPython: Revert to vanilla module, build without MPY hacks.

    While running some tests my figures seemed to suggest that not only is using builtins unnecessary for PicoSystem but somehow results in it being slower.

    This change reverts back to a plain MicroPython C++ module and is intended to build against a mostly vanilla upstream MicroPython.

    Mostly.

    It still needs:

    1. Overclock
    2. Overvolt
    3. Smaller gc_heap allocation
    4. A custom board config
    opened by Gadgetoid 0
  • Add play simple tone sequence function

    Add play simple tone sequence function

    Current a sound updating is only possible in update() with 25ms step. However, when porting games from other system sometimes we need play much faster changed tone sequences. How about add a api function like PlaySimpleTones(uint16_t *seq, uint32_t volume) and a bool state to tell the sound updating callback to switch between normal sound or simple tone state? The Sequence could be a 16bit uint array [xxxhz,yyyyms,xxxxhz,yyyyyms], then we could have easy to use sound effects.

    opened by zenodante 1
  • Python tool for converting images to c style arrays

    Python tool for converting images to c style arrays

    Not perfect but hopefully it can help c++ picosystem developers get images into their projects faster.

    The existing convert-images.py script creates 16.bpp files but I couldn't see any documentation how to get these working in cpp.

    opened by mathewthill 0
  • stats.idle not showing actual idle percentage.

    stats.idle not showing actual idle percentage.

    If fps is at 40, idle time should be more than 0. Easy fix would be to use stats.fps >= 40 on line 168 in picosystem.cpp, unless I am misunderstanding the use of stats.idle here.

    opened by bernhardstrobl 0
  • Transparent parts in the sprite sheet displayed as random color dots instead of transparent?

    Transparent parts in the sprite sheet displayed as random color dots instead of transparent?

    Hello,

    I created a buffer,and emptied it with clear(), then used sprite() to draw the game's map into it, and then used blit() to display the buffer on the screen. All the opaque parts are good, but the parts that should be transparent are displayed as random color dots. I tried to use clear() on the buffer SCREEN before drawing on it, but it didn't work. Drawing the sprite directly in SCREEN without blit() seems to work correctly, but I really need multiple layers.

    I used this web page to convert my PNG image: https://wiki.picosystem.com/en/tools/image-converter

    Here is my code and the sprite sheet I used. main.txt tileset

    Thank you!

    documentation 
    opened by rxing365 3
  • Ease onboarding with Gitpod

    Ease onboarding with Gitpod

    Gitpod is a tool allowing to have workspace in the cloud with anything you need to work on any specific task. I configured everything to allow building and contributing to picosystem project. I hope this will ease contribution and work with picosystem.

    opened by titimoby 5
Releases(v0.1.3)
  • v0.1.3(Jul 28, 2022)

    Notable Changes

    PicoSystem has switched from MicroPython 1.18 to MicroPython 1.19. There are many changes that may or may not affect us, and you can read about them here: https://github.com/micropython/micropython/releases/tag/v1.19

    The MicroPython API's Buffer has been updated to support loading a file directly. This makes it much tidier and closer to the C++ API.

    We've gone from:

    WALLS = Buffer(160, 160)
    open("gadgetoid-raycaster.16bpp", "rb").readinto(WALLS)
    

    To the succinct:

    WALLS = Buffer(160, 160, "gadgetoid-raycaster.16bpp")
    

    Filename is optional, so the old approach will still work and you can update your code (or not) at your leisure!

    That is, uh, pretty much it for now! No sense messing with perfection. :laughing:

    What's Changed

    • reset drawing state each time around the game loop by @lowfatcode in https://github.com/pimoroni/picosystem/pull/66
    • Fixed small grammar/spelling error by @CatRass in https://github.com/pimoroni/picosystem/pull/69
    • made blending more accurate, around 24 cycles per pixel now, fixed te… by @lowfatcode in https://github.com/pimoroni/picosystem/pull/70
    • Added (back) the missing playing() function by @ahnlak in https://github.com/pimoroni/picosystem/pull/73
    • make instructions more explicit by @splch in https://github.com/pimoroni/picosystem/pull/72
    • MicroPython: Textured raycaster example. by @Gadgetoid in https://github.com/pimoroni/picosystem/pull/47
    • Custom linker script for #54 by @Gadgetoid in https://github.com/pimoroni/picosystem/pull/55
    • removing syntax error by @prashantkamdar in https://github.com/pimoroni/picosystem/pull/76
    • Update MicroPython build instructions by @Gadgetoid in https://github.com/pimoroni/picosystem/pull/78
    • Updated micropython README to add info about sprite and text functions, along with a typo fix. by @ThePythonator in https://github.com/pimoroni/picosystem/pull/81
    • Bump to MicroPython v1.19 by @Gadgetoid in https://github.com/pimoroni/picosystem/pull/80
    • Buffer: Add support for loading spritesheet directly. by @Gadgetoid in https://github.com/pimoroni/picosystem/pull/82

    New Contributors

    • @CatRass made their first contribution in https://github.com/pimoroni/picosystem/pull/69
    • @splch made their first contribution in https://github.com/pimoroni/picosystem/pull/72
    • @prashantkamdar made their first contribution in https://github.com/pimoroni/picosystem/pull/76
    • @ThePythonator made their first contribution in https://github.com/pimoroni/picosystem/pull/81

    Full Changelog: https://github.com/pimoroni/picosystem/compare/v0.1.2...v0.1.3

    Source code(tar.gz)
    Source code(zip)
    picosystem-v0.1.3-micropython-v1.19.uf2(786.50 KB)
    picosystem-v0.1.3-PicoSystem.tar.gz(389.15 KB)
    picosystem-v0.1.3-PicoSystem.zip(389.50 KB)
  • v0.1.2(Nov 2, 2021)

    Notable Changes

    The MicroPython port now benefits from some fixes to drawing rectangles, and a fix to #46

    In the C++ APIaudio_position is now position and audio_playing is now playing.

    All The Things

    • Improve text demo, clamp hue in hsv() utility function by @lowfatcode in https://github.com/pimoroni/picosystem/pull/59
    • Typo fix by @codepope in https://github.com/pimoroni/picosystem/pull/60
    • Circle fix by @lowfatcode in https://github.com/pimoroni/picosystem/pull/62
    • Tidy API by @lowfatcode in https://github.com/pimoroni/picosystem/pull/64
    • Tidy audio API by @lowfatcode in https://github.com/pimoroni/picosystem/pull/63
    • Fixed an infinite loop when text off screen and fixed word wrap bug by @lowfatcode in https://github.com/pimoroni/picosystem/pull/65

    New Contributors

    • @codepope made their first contribution in https://github.com/pimoroni/picosystem/pull/60

    Full Changelog: https://github.com/pimoroni/picosystem/compare/v0.1.1...v0.1.2

    Source code(tar.gz)
    Source code(zip)
    picosystem-v0.1.2-micropython-v1.17.uf2(743.00 KB)
    picosystem-v0.1.2-PicoSystem.tar.gz(387.55 KB)
    picosystem-v0.1.2-PicoSystem.zip(387.93 KB)
  • v0.1.1(Oct 29, 2021)

    Notable Changes

    Added all of the SDK blend modes into MicroPython: COPY, ALPHA, MASK, PEN, DARKEN, LIGHTEN, ADD, SUBTRACT, MULTIPLY, DISSOLVE. Enjoy!

    Add HFLIP and VFLIP flags to sprite and blit.

    To flip a sprite you need to specify all eight arguments, eg:

    sprite(0, 0, 0, 1, 1, 8, 8, HFLIP | VFLIP)
    

    The above blits a single sprite, 0, in the top-left corner.

    The PicoSystem MicroPython release has been configured to apply a 1.20v overvolt. This should make the 250MHz overclock more stable on marginal RP2040s.

    All The Things

    • better default font. tidied up text demo by @lowfatcode in https://github.com/pimoroni/picosystem/pull/43
    • added pen blend mode by @lowfatcode in https://github.com/pimoroni/picosystem/pull/44
    • added new blend modes include multiply, add, subtract, dissolve, etc.… by @lowfatcode in https://github.com/pimoroni/picosystem/pull/45
    • Attempt at naming the remaining sprites by @Fordi in https://github.com/pimoroni/picosystem/pull/23
    • added vertical and horizontal flip flags to blit() by @lowfatcode in https://github.com/pimoroni/picosystem/pull/48
    • switch blend demo to use default spritesheet by @lowfatcode in https://github.com/pimoroni/picosystem/pull/49
    • added better demo of different text styling effects by @lowfatcode in https://github.com/pimoroni/picosystem/pull/50
    • made text effects into parameterised lambda functions to allow easy a… by @lowfatcode in https://github.com/pimoroni/picosystem/pull/51
    • Added audio_playing() function by @ahnlak in https://github.com/pimoroni/picosystem/pull/53
    • SDK: Overvolt from 1.1v to 1.2v by @Gadgetoid in https://github.com/pimoroni/picosystem/pull/57
    • C++ API: Round 2 - Sprite naming with creator input by @Fordi in https://github.com/pimoroni/picosystem/pull/52
    • added new glitch effect by @lowfatcode in https://github.com/pimoroni/picosystem/pull/56
    • MicroPython: Blend modes and sprite/blit HFLIP/VFLIP flags by @Gadgetoid in https://github.com/pimoroni/picosystem/pull/58

    New Contributors

    • @ahnlak made their first contribution in https://github.com/pimoroni/picosystem/pull/53

    Full Changelog: https://github.com/pimoroni/picosystem/compare/v0.1.0...v0.1.1

    Source code(tar.gz)
    Source code(zip)
    picosystem-v0.1.1-micropython-v1.17.uf2(743.00 KB)
    picosystem-v0.1.1-PicoSystem.tar.gz(387.96 KB)
    picosystem-v0.1.1-PicoSystem.zip(388.19 KB)
  • v0.1.0(Oct 22, 2021)

    New MicroPython Goodies

    This release includes three new demos ported over from C++: Text, Music and Audio.

    These demos are a little rough around the edges, but you can find them in the launcher by holding "A" during boot.

    :warning: The special colour syntax for text has changed from "\rgbRGB" and "\rgbaRGBA" to just "\penRGBA". :partying_face: You can now use "\spr001" to inline sprites in your text, eg: f"\\spr{LEAF:007} woo a leaf!" :thinking: No more Alpha? Bumped version to 0.1.0 to indicate that we (hopefully) shouldn't make any more breaking API changes

    • The argument limit of blit() has been fixed so you can specify destination width/height for stretch blit.
    • Error text generated by our bindings will always include the offending function name. Eg: pen(): a out of range. Expected 0 to 15
    • Miscellaneous bugfixes.
    • Documentation: https://github.com/pimoroni/picosystem/tree/main/micropython
    • A Python file of strongly-typed stub functions you can use to code against: https://github.com/pimoroni/picosystem/blob/main/micropython/picosystem.py

    flip() now also updates input. Here's a working, if terrible, rock-paper-scissors that fits in a tweet (inspired by Kari):

    import random
    p=pressed
    b='RPS'
    t=text
    s=l=0
    pen(0,0,0);clear();pen();t("RPS=YBA",0,0)
    while p(X)^1 and l<13:
     flip()
     for f in 0,1,2:
      if p((Y,B,A)[f]):e=random.randint(0,2);s+=(0,1,-1)[f-e];t(f"{b[f]}v{b[e]}=\\pen{('00FFD','0F0FW','F00FL')[f-e]}\\penFFFF s={s}");l+=1
    t("Bye")
    

    What's Changed

    • New text demo and bug fixes by @lowfatcode in https://github.com/pimoroni/picosystem/pull/36
    • text() now supports inline icons by @lowfatcode in https://github.com/pimoroni/picosystem/pull/41
    • MicroPython: Include function name in errors. IO in flip() by @Gadgetoid in https://github.com/pimoroni/picosystem/pull/40
    • MicroPython: Stubs & docstrings for VSCode by @Gadgetoid in https://github.com/pimoroni/picosystem/pull/35
    • MicroPython: Readme. by @Gadgetoid in https://github.com/pimoroni/picosystem/pull/21
    • Port Text example to MicroPython and fix blit() by @Gadgetoid in https://github.com/pimoroni/picosystem/pull/42

    Full Changelog: https://github.com/pimoroni/picosystem/compare/v0.0.7...v0.1.0

    Source code(tar.gz)
    Source code(zip)
    picosystem-v0.1.0-micropython-v1.17.uf2(733.50 KB)
    picosystem-v0.1.0-PicoSystem.tar.gz(315.17 KB)
    picosystem-v0.1.0-PicoSystem.zip(315.83 KB)
  • v0.0.7(Oct 21, 2021)

    What's Changed

    :warning: This version introduces a new text API, text_length has been replaced by measure() in both C++ and MicroPython. :warning: _reset() and tick() have been removed from MicroPython.

    C++

    • New text API
    • text_length replaced with measure(text, &w, &h)
    • Text can optionally set pen colour while displaying, use escape sequences \rgbXXX and \rgbaXXXX in your string to set the colour.

    MicroPython

    • All "state" API functions now reset to default when called with 0 args
    • Removed _reset() and tick() in favour of quit() and start(). To implement your own main loop use flip() maybe?
    • Added flip() for flipping REPL experiments to the screen.
    • New help() text.
    • General tidyup of bindings.
    • Text can optionally set pen colour, use escape sequences \\rgbXXX and \\rgbaXXXX to set the colour.
      pen(0xF, 0xF, 0xF)
      text("I can make a word \\rgbF00red\\rgbFFF just like that!")
      

    Full Changelog: https://github.com/pimoroni/picosystem/compare/v0.0.6...v0.0.7

    Source code(tar.gz)
    Source code(zip)
    picosystem-v0.0.7-micropython-v1.17.uf2(702.00 KB)
    picosystem-v0.0.7-PicoSystem.tar.gz(300.93 KB)
    picosystem-v0.0.7-PicoSystem.zip(301.08 KB)
  • v0.0.6(Oct 21, 2021)

    What's Changed

    This release is the same as v0.0.5 with one small fix- the display buffers have been aligned to avoid a 1-pixel offset in MicroPython. (Previously m_new was guaranteeing uint32_t alignment)

    Fixed in v0.0.6

    • SDK: Force memory aligned display buffers. by @Gadgetoid in https://github.com/pimoroni/picosystem/pull/33

    :warning: Alignment change also apply to the C++ SDK!

    New MicroPython API changes

    • start() - enters a blocking main loop, calls MICROPY_EVENT_POLL_HOOK to keep subsystems running
    • quit() - signals start() to break
    • Add start() to examples in place of while True: tick()
    • Fix launcher crashing when buttons pressed during startup
    • Add "quit" menu item to launcher, to unblock for Thonny
    • Reset "tick" on "quit" so applications launched from the launcher don't start at weird tick offsets

    start() enters a blocking main loop that dispatches update/draw calls to the Python functions.

    When quit() is called, start() will drop out of the loop, clean up the cached update/draw pointers and reset "tick".

    Your scripts should now look like this:

    def update(tick):
        pass
    
    def draw(tick):
        pass
    
    start()
    
    # You can put stuff here that runs after you `quit()`
    

    tick() and _reset() are included for posterity, but these may both be deprecated since _reset() happens implicitly when quit() is called.

    Stats & GC

    • Fix calculation of "tick" us stats
    • Above also fixes FPS counter
    • Fix tick being double-incremented, and fix launcher to account for this
    • Run the C equivalent of gc.collect() in the main loop
    • Try and sleep the is_flipping() loop a little... my PicoSystem is getting mighty warm!

    OC/Buffer

    • Overclock early to avoid an on-init change of clock doing bad things
    • Give the SCREEN buffer back to C exclusively, MPY reduces the gc_heap to accommodate this change
    • see: https://github.com/pimoroni/micropython/commit/f826b9e7a1921604b4cd3e1911cdaed3a380496b

    Full Changelog 0.0.5: https://github.com/pimoroni/picosystem/compare/v0.0.4...v0.0.5 Full Changelog 0.0.6: https://github.com/pimoroni/picosystem/compare/v0.0.5...v0.0.6

    Source code(tar.gz)
    Source code(zip)
    picosystem-v0.0.6-micropython-v1.17.uf2(698.00 KB)
    picosystem-v0.0.6-PicoSystem.tar.gz(294.00 KB)
    picosystem-v0.0.6-PicoSystem.zip(294.41 KB)
  • v0.0.5(Oct 21, 2021)

    What's Changed

    :warning: No changes to the C++ SDK!

    New MicroPython API changes

    • start() - enters a blocking main loop, calls MICROPY_EVENT_POLL_HOOK to keep subsystems running
    • quit() - signals start() to break
    • Add start() to examples in place of while True: tick()
    • Fix launcher crashing when buttons pressed during startup
    • Add "quit" menu item to launcher, to unblock for Thonny
    • Reset "tick" on "quit" so applications launched from the launcher don't start at weird tick offsets

    start() enters a blocking main loop that dispatches update/draw calls to the Python functions.

    When quit() is called, start() will drop out of the loop, clean up the cached update/draw pointers and reset "tick".

    Your scripts should now look like this:

    def update(tick):
        pass
    
    def draw(tick):
        pass
    
    start()
    
    # You can put stuff here that runs after you `quit()`
    

    tick() and _reset() are included for posterity, but these may both be deprecated since _reset() happens implicitly when quit() is called.

    Stats & GC

    • Fix calculation of "tick" us stats
    • Above also fixes FPS counter
    • Fix tick being double-incremented, and fix launcher to account for this
    • Run the C equivalent of gc.collect() in the main loop
    • Try and sleep the is_flipping() loop a little... my PicoSystem is getting mighty warm!

    OC/Buffer

    • Overclock early to avoid an on-init change of clock doing bad things
    • Give the SCREEN buffer back to C exclusively, MPY reduces the gc_heap to accommodate this change
    • see: https://github.com/pimoroni/micropython/commit/f826b9e7a1921604b4cd3e1911cdaed3a380496b

    Full Changelog: https://github.com/pimoroni/picosystem/compare/v0.0.4...v0.0.5

    Source code(tar.gz)
    Source code(zip)
    picosystem-v0.0.5-micropython-v1.17.uf2(698.00 KB)
    picosystem-v0.0.5-PicoSystem.tar.gz(294.00 KB)
    picosystem-v0.0.5-PicoSystem.zip(294.41 KB)
  • v0.0.4(Oct 20, 2021)

    What's Changed

    • Added new small font, default to small font when in pixel doubled mode by @lowfatcode in https://github.com/pimoroni/picosystem/pull/27
    • Remove 300ms delay before logoless boot by @Fordi in https://github.com/pimoroni/picosystem/pull/24
    • MicroPython: Fix macOS bug, _logo for launcher. by @Gadgetoid in https://github.com/pimoroni/picosystem/pull/30

    MicroPython

    • Now uses the smol font.
    • Fixed unable to connect to serial in macOS/Thonny, this was accomplished by removing default splash/delay at startup.
    • Inherited double vsync default clear goodness from @Fordi
    • Removed the default splash, powering on will always result in a black screen unless you set up a main.py with... something.
    • Added a new _logo() command to draw a fullscreen, centered logo from the internal ROM bitmask. This is used for the launcher splash.

    :warning: reset() is now _reset() - must be called before __import__()'ing another file, since it resets the update/draw pointers. :warning: We cannot start the launcher by default in boot.py. This breaks Thonny since it runs on soft-reset.

    New Contributors

    • @Fordi made their first contribution in https://github.com/pimoroni/picosystem/pull/24

    Full Changelog: https://github.com/pimoroni/picosystem/compare/v0.0.3...v0.0.4

    Source code(tar.gz)
    Source code(zip)
    picosystem-v0.0.4-micropython-v1.17.uf2(696.50 KB)
    picosystem-v0.0.4-PicoSystem.tar.gz(293.99 KB)
    picosystem-v0.0.4-PicoSystem.zip(294.42 KB)
  • v0.0.3(Oct 20, 2021)

    What's Changed

    This release includes some significant refactoring to the game loop, plus a new approach to MicroPython which bakes everything in as "builtins" rather than requiring "from picosystem import *"

    :warning: Breaking: draw() is now draw(uint32_t tick) in C++ or draw(tick) in MicroPython :warning: MicroPython: from picosystem import * is obsolete, all API functions are now builtin for performance reasons

    • CI: Add CPack setup and example release files. by @Gadgetoid in https://github.com/pimoroni/picosystem/pull/20
    • Fixed drawing of note stems by @lowfatcode in https://github.com/pimoroni/picosystem/pull/22
    • MicroPython: Switch module to builtin. by @Gadgetoid in https://github.com/pimoroni/picosystem/pull/26
    • SDK: Refactor game loop, add stats. by @lowfatcode in https://github.com/pimoroni/picosystem/pull/25

    Full Changelog: https://github.com/pimoroni/picosystem/compare/v0.0.2...v0.0.3

    Source code(tar.gz)
    Source code(zip)
    picosystem-v0.0.3-micropython-v1.17.uf2(696.50 KB)
    picosystem-v0.0.3-PicoSystem.tar.gz(294.70 KB)
    picosystem-v0.0.3-PicoSystem.zip(295.01 KB)
  • v0.0.2(Oct 19, 2021)

    PicoSystem MicroPython

    This build is still a little rough around the edges, and is being generated from a fork of MicroPython with a small patch to support PicoSystem's display buffer being allocated on MicroPython's GC heap rather than statically (not enough leftover RAM!)

    Changes

    • Fixed a bug in poly
    • Added ellipse/fellipse
    • Added more Sprite constants

    Flashing

    • Connect your PicoSystem to your computer.
    • Hold X while powering on your PicoSystem to ender bootloader mode.
    • Copy the .uf2 file (linked below) onto the "RPI-RP2" directory that appears.

    Running

    Hold "A" while starting up (when you see the PicoSystem splash) to enter the launcher and try some of the baked examples.

    Connect to your computer and use Thonny -

    • Turn on your PicoSystem
    • In Thonny go to Run -> Select Interpreter
    • Pick "MicroPython (Rapsberry Pi Pico)"
    • Leave Port at "Try to detect port automatically"
    • Click the "Stop" button and you should connect to PicoSystem's repl
    • Type Voice().play(440) - your PicoSystem should beep!
    Source code(tar.gz)
    Source code(zip)
    picosystem-v0.0.2-micropython-v1.17.uf2(695.50 KB)
  • v0.0.1(Oct 18, 2021)

    PicoSystem MicroPython

    This build is still a little rough around the edges, and is being generated from a fork of MicroPython with a small patch to support PicoSystem's display buffer being allocated on MicroPython's GC heap rather than statically (not enough leftover RAM!)

    Flashing

    • Connect your PicoSystem to your computer.
    • Hold X while powering on your PicoSystem to ender bootloader mode.
    • Copy the .uf2 file (linked below) onto the "RPI-RP2" directory that appears.

    Running

    Hold "A" while starting up (when you see the PicoSystem splash) to enter the launcher and try some of the baked examples.

    Connect to your computer and use Thonny -

    • Turn on your PicoSystem
    • In Thonny go to Run -> Select Interpreter
    • Pick "MicroPython (Rapsberry Pi Pico)"
    • Leave Port at "Try to detect port automatically"
    • Click the "Stop" button and you should connect to PicoSystem's repl
    • Type Voice().play(440) - your PicoSystem should beep!
    Source code(tar.gz)
    Source code(zip)
    picosystem-v0.0.1-micropython-v1.17.uf2(689.50 KB)
Owner
Pimoroni Ltd
We are a company of Makers and educators based in Sheffield, UK.
Pimoroni Ltd
Examples for using ONNX Runtime for machine learning inferencing.

Examples for using ONNX Runtime for machine learning inferencing.

Microsoft 269 Aug 4, 2022
Examples to help you programming the MSP430FR2433 from Texas Instruments.

MSP430FR2433 examples Examples to help you programming the MSP430FR2433 from Texas Instruments. I wrote this code quite a few years ago when the code

Juan Sandubete 2 Feb 2, 2022
Driver layer GPU libraries and tests for PSP2

PVR_PSP2 Driver layer GPU libraries and tests for PSP2 Currently this project include: Common and PSP2-specific GPU driver headers. Extension library

null 61 May 31, 2022
Mobile Robot Programming Toolkit (MRPT) provides C++ libraries aimed at researchers in mobile robotics and computer vision

The MRPT project 1. Introduction Mobile Robot Programming Toolkit (MRPT) provides C++ libraries aimed at researchers in mobile robotics and computer v

MRPT 1.5k Aug 4, 2022
Implementing Deep Convolutional Neural Network in C without External Libraries for YUV video Super-Resolution

DeepC: Implementing Deep Convolutional Neural Network in C without External Libraries for YUV video Super-Resolution This code uses FSRCNN algorithm t

Milad Abdollahzadeh 8 Jul 13, 2022
Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow

eXtreme Gradient Boosting Community | Documentation | Resources | Contributors | Release Notes XGBoost is an optimized distributed gradient boosting l

Distributed (Deep) Machine Learning Community 23k Aug 6, 2022
High performance, easy-to-use, and scalable machine learning (ML) package, including linear model (LR), factorization machines (FM), and field-aware factorization machines (FFM) for Python and CLI interface.

What is xLearn? xLearn is a high performance, easy-to-use, and scalable machine learning package that contains linear model (LR), factorization machin

Chao Ma 3k Aug 1, 2022
Video, Image and GIF upscale/enlarge(Super-Resolution) and Video frame interpolation. Achieved with Waifu2x, SRMD, RealSR, Anime4K, RIFE, CAIN, DAIN and ACNet.

Video, Image and GIF upscale/enlarge(Super-Resolution) and Video frame interpolation. Achieved with Waifu2x, SRMD, RealSR, Anime4K, RIFE, CAIN, DAIN and ACNet.

Aaron Feng 7.3k Aug 7, 2022
ORB-SLAM3 is the first real-time SLAM library able to perform Visual, Visual-Inertial and Multi-Map SLAM with monocular, stereo and RGB-D cameras, using pin-hole and fisheye lens models.

Just to test for my research, and I add coordinate transformation to evaluate the ORB_SLAM3. Only applied in research, and respect the authors' all work.

B.X.W 5 Jul 11, 2022
Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.

Cartographer Purpose Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platfo

Cartographer 6.1k Aug 1, 2022
A programmable and highly maneuverable robotic cat for STEM education and AI-enhanced services.

OpenCat is the open-source Arduino and Raspberry Pi-based robotic pet framework developed by Petoi, the maker of futuristic programmable robot

Petoi LLC 753 Aug 11, 2022
A fast, scalable, high performance Gradient Boosting on Decision Trees library, used for ranking, classification, regression and other machine learning tasks for Python, R, Java, C++. Supports computation on CPU and GPU.

Website | Documentation | Tutorials | Installation | Release Notes CatBoost is a machine learning method based on gradient boosting over decision tree

CatBoost 6.7k Aug 2, 2022
Deep Learning API and Server in C++11 support for Caffe, Caffe2, PyTorch,TensorRT, Dlib, NCNN, Tensorflow, XGBoost and TSNE

Open Source Deep Learning Server & API DeepDetect (https://www.deepdetect.com/) is a machine learning API and server written in C++11. It makes state

JoliBrain 2.4k Aug 2, 2022
In-situ data analyses and machine learning with OpenFOAM and Python

PythonFOAM: In-situ data analyses with OpenFOAM and Python Using Python modules for in-situ data analytics with OpenFOAM 8. NOTE that this is NOT PyFO

Argonne Leadership Computing Facility - ALCF 105 Aug 5, 2022
CTranslate2 is a fast inference engine for OpenNMT-py and OpenNMT-tf models supporting both CPU and GPU executio

CTranslate2 is a fast inference engine for OpenNMT-py and OpenNMT-tf models supporting both CPU and GPU execution. The goal is to provide comprehensive inference features and be the most efficient and cost-effective solution to deploy standard neural machine translation systems such as Transformer models.

OpenNMT 315 Aug 8, 2022
VNOpenAI 23 Jul 31, 2022
Fast and robust template matching with majority neighbour similarity and annulus projection transformation

A-MNS_TemplateMatching This is the official code for the PatternRecognition2020 paper: Fast and robust template matching with majority neighbour simil

Layjuns 15 Jul 4, 2022
a fast and user-friendly runtime for transformer inference (Bert, Albert, GPT2, Decoders, etc) on CPU and GPU.

a fast and user-friendly runtime for transformer inference (Bert, Albert, GPT2, Decoders, etc) on CPU and GPU.

Tencent 1.2k Aug 5, 2022