coding dual oled animation help

I have my eye animations working great but! my eyes don't blink, or move at the same time! how can I fix that? also, I would like to add random blinking. if anyone can help i would relly be thankful as it's for a Halloween alien mask to scare the trick or treaters lol

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

#define OLED_RESET 4
Adafruit_SSD1306 display(128, 64, &Wire, OLED_RESET);

//Paste your bitmap here

void setup(){

}

void loop() {
display.begin(SSD1306_SWITCHCAPVCC, 0x3D); //or 0x3C
display.clearDisplay(); //for Clearing the display
display.drawBitmap(0, 0, myBitmap1, 128, 64, WHITE); // display.drawBitmap(x position, y position, bitmap data, bitmap width, bitmap height, color)
display.display();
delay(500);
display.begin(SSD1306_SWITCHCAPVCC, 0x3D); //or 0x3C
display.clearDisplay(); //for Clearing the display
display.drawBitmap(0, 0, myBitmap2, 128, 64, WHITE); // display.drawBitmap(x position, y position, bitmap data, bitmap width, bitmap height, color)
display.display();
delay(500);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); //or 0x3C
display.clearDisplay(); //for Clearing the display
display.drawBitmap(0, 0, myBitmap1, 128, 64, WHITE); // display.drawBitmap(x position, y position, bitmap data, bitmap width, bitmap height, color)
display.display();
delay(500);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); //or 0x3C
display.clearDisplay(); //for Clearing the display
display.drawBitmap(0, 0, myBitmap2, 128, 64, WHITE); // display.drawBitmap(x position, y position, bitmap data, bitmap width, bitmap height, color)
display.display();
delay(500);
}

The delay(500) is going to have to go.

Take a look at the blink without delay example in the IDE for clues.

Please remember to use code tags when posting code.

Why is setup() empty?

TheMemberFormerlyKnownAsAWOL:
The delay(500) is going to have to go.

Take a look at the blink without delay example in the IDE for clues.

Please remember to use code tags when posting code.

Why is setup() empty?

I looked at the example and it's not making sense to me as i am a beginner? I am a noob so I should have been more clear my bad. I meant blink the animation on-screen at the same time on both screens

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html .
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks... Tom... :slight_smile:

Thanks for the help! I figured it out myself.