DESHBOT Project – Arduino Nano OLED GIF Animation Setup

by devkrishnavhora in Circuits > Arduino

13 Views, 0 Favorites, 0 Comments

DESHBOT Project – Arduino Nano OLED GIF Animation Setup

WhatsApp Image 2026-08-25 at 11.31.59 AM.jpeg

The DESHBOT project uses an Arduino Nano with an OLED display to show a GIF animation. The GIF must first be converted into monochrome bitmap frame arrays, which can then be added to the Arduino sketch.

Supplies

1 Deshbot shield

2 Arduino nano

3 oled display

4 power suply

Set Up the Components

Connect all DESHBOT components to the Arduino Nano. For the OLED display, use the I2C connection:

  1. OLED VCC → Arduino Nano 5V
  2. OLED GND → Arduino Nano GND
  3. OLED SDA → Arduino Nano A4
  4. OLED SCL → Arduino Nano A5

Install the required libraries in Arduino IDE:

  1. Adafruit GFX Library
  2. Adafruit SSD1306 Library


Open the GIF Conversion Website

Screenshot 2026-08-25 105604.png

GIF to OLED Animation Converter

This tool converts an animated GIF into individual bitmap arrays that can be displayed on an SSD1306 OLED.

Upload the GIF

Screenshot 2026-08-25 104931.png

in the Choose an animation section:

  1. Click the upload area.
  2. Select the GIF file that you want to display on the DESHBOT OLED.
  3. Wait for the GIF frames and preview to load.


Set the Display Settings

Screenshot 2026-08-25 104914.png

For a standard 0.96-inch SSD1306 OLED, select:

  1. Display size: 128 × 64
  2. Width: 128 px
  3. Height: 64 px
  4. Scaling: Fit or the option that gives the best preview
  5. Dithering: Hard Threshold for logos, robot eyes, and simple animations
  6. Threshold: Start with 128 and adjust if necessary
  7. Frame delay: 0 to keep the original GIF timing, or set a custom delay
  8. Frame limit: Reduce the number of frames if the animation is too large
  9. Invert colours: Enable only if the animation colours appear reversed

The tool supports 128×64 output, frame limiting, dithering, custom frame delay, and PROGMEM storage.

Select the Output Format

Screenshot 2026-08-25 104946.png

in the Output section, select:

  1. Format: Adafruit GFX
  2. Store in PROGMEM: Enabled

Adafruit GFX format is compatible with the display.drawBitmap() function used with the Adafruit SSD1306 library. PROGMEM stores the animation frames in flash memory instead of using the Nano's limited RAM.

Copy the Frame Arrays

Screenshot 2026-08-25 104946.png

Click:

Copy arrays

The website will generate frame arrays similar to:

const uint8_t frame_00[] PROGMEM = {
0x01, 0x20, 0x00, 0x00,
// Remaining GIF frame data
};

Copy all the generated arrays.

Paste the Arrays Into the DESHBOT Sketch

Screenshot 2026-08-25 105011.png

Open the DESHBOT Arduino Nano sketch.

Paste all copied GIF frame arrays near the top of the sketch, after the library includes and before setup().

Example:

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

// Paste GIF frame arrays here

const uint8_t frame_00[] PROGMEM = {
// GIF data
};

const uint8_t frame_01[] PROGMEM = {
// GIF data
};

If the website generates a complete animation sketch, you can also click Copy sketch and use its animation section with the DESHBOT project. The converter specifically provides both frame arrays and a complete sketch output.

Upload and Test

Screenshot 2026-08-25 105024.png

Compile the DESHBOT sketch and upload it to the Arduino Nano.

The OLED will display each bitmap frame one after another, creating the GIF animation. Keep the GIF short or reduce its size and number of frames because every 128×64 monochrome frame requires approximately 1 KB of storage, which can quickly fill the Nano's available program memory.

Important Note

For the DESHBOT project, do not manually edit the hexadecimal GIF array values. Copy the complete generated output from the converter and paste it directly into the Arduino sketch. The frame order and array names must remain correct for the animation code to work.

Final Animation Video

firts is oled and second is the gif that we uploaded if you have high power more ram microcontroller you can upladed a full episode or video