A question about Bluetooth and OLED.

Hello everyone,

I'm currently stuck on an odd problem. I have a controller that I'm constructing to control some motors and and relay information to the user. To do so, I have an adafruit OLED that will mount to the face of the controller.

The controller sends out a "packet" of information, including button states and joystick position. This packet is picked up and processed by an outside computer that then decides on proper actions. The computer will then send a "state" to the controller and the controller will draw an icon accordingly.
This packet must be sent continuously or an "estop state" is triggered. This is a safety measure and must remain in the program.
So here's the issue:
When the arduino is drawing the bitmap, the packet is temporally halted while (I'm guessing) the arduino thinks about it.
Is there a way to avoid this?
I'm currently using a pro mini, but have tried it on a DUE with the same results.
I've looked into storing the bmps on the flash memory, but I don't yet have the skill to do this, and am having some trouble finding a tutorial on it.
Thanks for any help!!

Here’s the code in a notepad file, as it’s too long to cut and paste.
Thanks again.

ControllerCode.txt (13 KB)

ControllerCode.txt (13 KB)

What sort of response time do you need?

You have performance tracking in there - how long are the bitmaps taking to draw?

Could you put a call to check for that condition into each iteration of the loop executed for every scanline?

Could the serial baud rate be an issue, ie, are you filling the buffer and blocking while waiting for the serial to output? (I'm just looking at how much debug you're printing to serial, which is only running at 19200 baud. ). Try reducing how much you print and/or increase baud rate.