Galactic Unicorn Bounce - Simple GFX Demo
by tonygo2 in Circuits > Microcontrollers
985 Views, 1 Favorites, 0 Comments
Galactic Unicorn Bounce - Simple GFX Demo

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
- Pimoroni Galactic Unicorn
- The supplied USB cable
- Thonny editor - free download
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.
The Main Loop

The first section sets up the starting position and colour.
The main loop - 1400 cycles
- Deletes the blob at the current position with either background or trail colour
- Updates the position for the next blob draw
- Changes the colour if it will be hitting an edge of the display
- Draws the new blob
- Updates the delay if necessary to gradually speed things up
After the loop we tidy up.
Video and Code

Great display - big, bright and fast.
Comments welcome.
Enjoy your coding.