Introduction: Galactic Unicorn Bounce - Simple GFX Demo

About: Retired teacher of computing - started 1967 with FORTRAN IV. I now play with development boards such as Raspberry Pi, Pico, Arduino, micro:bit and Adafruit CircuitPython boards like the Insybitsy M4 and Circui…

This is a very simple tutorial illustrating some graphics function on the new Pimoroni Galactic Unicorn Board. It has 583 RGB LEDs and this tutorial flashes most of them.

Supplies

  1. Pimoroni Galactic Unicorn
  2. The supplied USB cable
  3. Thonny editor - free download

Step 1: Setup Phase & Title

There are plenty of comments in the code to help your understanding.

Here we set up the board, create some colours and display the title on the screen for 3 seconds before clearing the screen.

Step 2: The Main Loop

The first section sets up the starting position and colour.

The main loop - 1400 cycles

  1. Deletes the blob at the current position with either background or trail colour
  2. Updates the position for the next blob draw
  3. Changes the colour if it will be hitting an edge of the display
  4. Draws the new blob
  5. Updates the delay if necessary to gradually speed things up

After the loop we tidy up.





Step 3: Video and Code

Great display - big, bright and fast.

Comments welcome.

Enjoy your coding.