Maker Pro

Arduino OLED Eyes Animation for Robotics Projects

May 07, 2024 by jobitjoseph1

Learn to program eye animation on an OLED display for you next robotic project.

For hobbyists venturing into robotics, creating engaging eye animations on OLED displays with Arduino can be challenging amidst the multitude of online resources. To simplify this, we've compiled the top five reliable methods based on our research. This article offers a clear comparison to help you begin your project effectively.

Circuit Diagram to Interface OLED With Arduino

To communicate with the OLED display using I2C, connect it to the Arduino UNO's hardware I2C port via pins A4 (SDA) and A5 (SCK). Our blog provides detailed instructions on using OLED displays with Arduino.

The setup utilizes a breadboard and Arduino UNO, powered via a laptop's USB cable. We'll use this setup to demonstrate various OLED eye animations and discuss their respective pros and cons to aid your decision-making.

Eye Animation on OLED Display by Intellar

The first approach is by Intellar, and you can find the source code for their Eye Animation on OLED Display in their GitHub repository.

The code introduces functions for creating engaging eye animations using simple shapes, including three moods (Normal, Sleep, Smile), various eye positions, and blinking. Here's a brief overview of the code functions:


  • Simple functions make it easy to use.
  • Eye position can be adjusted to look in multiple directions.
  • Users can draw and customize eyes with adjustable height and width.


  • Limited to three moods (Normal, Sleep, Smile), which may not be sufficient for all projects.

Simple Animated Eye Using Arduino by SpiderMaf

The second option, created by SpiderMaf, offers source code available in the author's GitHub repository, along with an explanatory video on their YouTube channel for a detailed understanding of the project.

This option introduces customizable animated eyes using circles, including precise eye movements with pupils. The functions are compact compared to others, providing a human-like feel due to the inclusion of pupils.


  • Similar to the first option by Intellar but lacks native eye movement towards corners.
  • Adjustable eye size and position.
  • Compact functions with a human-like appearance due to the inclusion of pupils.


  • Similar to the first option by Intellar.

Akno by AbdulsalamAbbod

he third option, developed by AbdulsalamAbbod, features the "Akno" project with source code available in the GitHub repository. Unlike other options, this project integrates a small OLED display as the face of an open-source robot project.

The method uses rectangular eyes and offers a wider range of expressions compared to others, utilizing the U8g2lib library that supports various display types.


  • Includes functions for a diverse range of expressions like sad, upset, wonder, happy, cute, angry, and suspicious.
  • Compatible with multiple display types, making it ideal for small hobby robots.
  • Lightweight in terms of resource usage.


  • Lacks human-like characteristics.
  • No provision for adjusting eye size and position.

Moving Eyes Arduino by Vinny

The fourth option, created by Mr. Vinny, features OLED Moving Eyes with source code available in the author's GitHub repository. Mr. Vinny has also provided an explanatory video on their YouTube channel and a detailed blog post about this project.

This method focuses on drawing bitmap images directly onto OLED. The process involves converting BMP images into C code for display on the OLED.


  • Allows rendering of custom images, with the author providing a collection of 30 eye expression sets.
  • Simple programming by calling a single function to display images.


  • High memory consumption, requiring 1K Bytes of data for each BMP image's C data.
  • Limitations on the number of images that can be displayed due to memory constraints on Arduino UNO.

Robotic Eye Animations Using Arduino UNO by Picaio

The second option by Picaio introduces Robotic Eye Animation with source code available on GitHub and an explanatory video on their YouTube channel.

This method demonstrates efficient robotic eye animation on Arduino UNO by optimizing the BMP technique to generate C code only for eye sections, reducing space and allowing for more expressions.


  • Offers realistic eye movements (up, down, left, right) and various expressions (normal, sleep, angry, tired, sad).
  • Simulates natural eye movements during idle time.


  • Initial complexity may pose a challenge for beginners to understand.


Choosing among these options depends on personal preference and project requirements. Here's a simplified breakdown:

  • Option 2 (SpiderMaf): Offers customization, simplicity, lightweight design, and basic features.
  • Option 3 (AbdulsalamAbbod): Provides more features, less customization, and is lightweight.
  • Option 4 (Vinny): Ideal for designing your own user interface (UI) using bitmap images.
  • Option 1 (Intellar): Suitable for basic eye movements in all directions with simple moods and lightweight design.
  • Option 5 (Picaio): Offers expressive eye movements in all directions with various moods.

You can learn more about the "Arduino OLED Eyes Animation for Robotics Projects" project on our official webpage!

Related Content


You May Also Like