Using Millis with Bitmaps

Hello all,

I've been looking for a tutorial for this task for many hours. Alas, I have found nothing.

So I bring forth the problem to this forum in the hopes that a kind soul can at least guide me in the right direction.

My task is simple. I would like to move a servo on the one hand, and display bitmaps on an OLED on the other. I have the servo functioning with millis. However, I cannot for the life of me work out how to display the bitmaps.

I have converted all the bitmaps into code form via LCD Assistant. I am using the "Adafruit SSD1306"
and "Adafruit GFX" libraries.

The command to draw a bitmap is "display.drawBitmap( x, y, 'name', w, h, 'colour')".

The problem is that the tutorials for millis usually relate to a variable within the brackets. I can't draw a bitmap the same way I can write an LED or a servo. So I'm left rather confused.

The question I am left with is this: What is the simplest way to draw bitmaps with millis?

Any answers would be very much appreciated.

My task is simple

Great.

What's the real problem?

What is the simplest way to draw bitmaps with millis?

What is the relationship between milliseconds and a bitmap?

I suggest to use the command that you have already identified to draw the bitmap.

Leave the servos, etc. out of this until you get that working.

BurrBoy:
The problem is that the tutorials for millis usually relate to a variable within the brackets. I can't draw a bitmap the same way I can write an LED or a servo. So I'm left rather confused.

That does not make any sense. Why would you expect to draw a bitmap in the same way that you write to a servo? That's a bit like expecting to bake a cake the same way you ride a bicycle.

Post our program so we can better understand your problem.

...R

Hi,

I have converted all the bitmaps into code form via LCD Assistant. I am using the "Adafruit SSD1306"
and "Adafruit GFX" libraries.

How many bitmaps ahve you got?
Do you want to run them like a slide show, using millis to time the frame intervals?

Tom... :slight_smile: