Arduino OLED Eyes Animation for Robotics Projects

2.2K320

Intro: Arduino OLED Eyes Animation for Robotics Projects

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 blog offers a clear comparison to help you begin your project effectively.

STEP 1: 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.

STEP 2: Option 1: 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:

Pros:

  • 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.

Cons:

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


STEP 3: 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.

Pros:

  • 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.

Cons:

  • Similar to the first option by Intellar.


STEP 4: Akno by AbdulsalamAbbod


The 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.

Pros:

  • 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.

Cons:

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


STEP 5: OLED 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.

Pros:

  • 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.

Cons:

  • 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.


STEP 6: 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.

Pros:

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

Cons:

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


STEP 7: Conclusion

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!