Galactic Unicorn Bounce - Simple GFX Demo

by tonygo2 in Circuits > Microcontrollers

911 Views, 1 Favorites, 0 Comments

Galactic Unicorn Bounce - Simple GFX Demo

BOUNCE PIC.jpg

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

Setup Phase & Title

Bounce1.jpg

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.

The Main Loop

Bounce2.jpg

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.





Video and Code

Galactic Unicorn Bounce

Great display - big, bright and fast.

Comments welcome.

Enjoy your coding.

Downloads