Maker.io main logo

Bitmap Animation on SSD1331 OLED Display (SPI) With Visuino

33

2026-08-28 | By Ron Cutts

License: GNU Lesser General Public License Displays Microcontrollers Serial / UART Arduino ESP32

In this tutorial, we will display and move around a bitmap image in a simple form of animation on the SSD1331 OLED display (SPI) with Visuino.

Watch the video.

Learn more about Visuino: What is Visuino

What You Will Need

What You Will Need

What You Will Need photo 2

What You Will Need photo 3

What You Will Need photo 4

The Circuit

  • Connect Display pin[CS] to Arduino digital pin[7]

  • Connect Display pin[DC] to Arduino digital pin[8]

  • Connect Display pin[RES] to Arduino digital pin[9]

  • Connect Display pin[SDA] to Arduino digital pin[11]

  • Connect Display pin[SCL] to Arduino digital pin[13]

  • Connect Display pin[VCC] to Arduino positive pin[+5V]

  • Connect Display pin[GND] to Arduino ground pin[GND]

The Circuit

Start Visuino, and Select the Arduino UNO Board Type

To start programming the Arduino, you will need to have the Arduino IDE installed from here: https://www.arduino.cc/.

Please be aware that there are some critical bugs in Arduino IDE 1.6.6. Make sure that you install 1.6.7 or higher; otherwise, this will not work! If you have not done so, follow the steps to set up the Arduino IDE to program Arduino UNO! The Visuino: https://www.visuino.eu also needs to be installed. Start Visuino as shown in the first picture. Click on the "Tools" button on the Arduino component (Picture 1) in Visuino. When the dialog appears, select "Arduino UNO" as shown in Picture 2

Start Visuino, and Select the Arduino UNO Board Type

Start Visuino, and Select the Arduino UNO Board Type photo 2

In Visuino ADD Components

  • Add "SSD1331 OLED Display (SPI)" component

  • Add 2X "Sine Integer Generator"

In Visuino ADD Components

In Visuino ADD Components photo 2

In Visuino Set Components

  • Select "SineIntegerGenerator1" and in the properties window set Amplitude:20, Frequency (Hz):0.1, Offset: 20

  • Select "SineIntegerGenerator2" and in the properties window set Amplitude:10, Frequency (Hz):0.1, Offset: 10

  • Double click on the "DisplayOLED1" and in the elements window drag "Draw Bitmap" to the left side, on the left side then select "Draw Bitmap1" and in the properties window select "Bitmap" field and click on the 3 dots.
    In the "Bitmap Editor" click on the "Load" button and load the bitmap (You can download the test bitmap attached here)

  • In the "Bitmap Editor" click on the "Load" button and load the bitmap (You can download the test bitmap attached here)

  • To animate the Bitmap movement, we need to control the X and Y properties. To do that we will add pins to them:
    In the Object Inspector select the "X" property
    Click on the "Pin" button at front of the property,From the Drop Down list select the "Integer SinkPin"
    Do the same for the "Y" property
    Close the "Elements" dialog
    You will see the new "X", and "Y" pins added to the "Elements.Draw Bitmap1" element

In Visuino Set Components

In Visuino Set Components photo 2

In Visuino Set Components photo 3

In Visuino Set Components photo 4

In Visuino Set Components photo 5

In Visuino Set Components photo 6

In Visuino Set Components photo 7

In Visuino Connect Components

  • Connect "SineIntegerGenerator1" pin[Out] to "DisplayOLED1">"Draw Bitmap1" pin[X]

  • Connect "SineIntegerGenerator2" pin [Out] to "DisplayOLED1">"Draw Bitmap1" pin[Clock]

  • Connect "SineIntegerGenerator2" pin [Out] to "DisplayOLED1">"Draw Bitmap1" pin[Y]

  • Connect "DisplayOLED1" pin [Reset] to Arduino digital pin[9]

  • Connect "DisplayOLED1" pin [Data Command] to Arduino digital pin[9]

  • Connect "DisplayOLED1" pin [Out SPI] to Arduino pin[SPI In]

  • Connect "DisplayOLED1" pin [Chip Select] to Arduino digital pin[7]

In Visuino Connect Components

In Visuino Connect Components photo 2

Generate, Compile, and Upload the Arduino Code

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Generate, Compile, and Upload the Arduino Code

Play

If you power the Arduino UNO module and the OLED display, you will see the bitmap moving around the OLED display as seen in the video.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project that I created for this; you can download it here and open it in Visuino: https://www.visuino.eu

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.