sparkfun / SparkFun_Qwiic_OLED_Arduino_Library

Arduino Library for SparkFun's OLED Qwiic (I²C) boards
https://docs.sparkfun.com/SparkFun_Qwiic_OLED_Arduino_Library/introduction/
Other
6 stars 7 forks source link

Top right bitmap causes column 0 corruption on 1.3" (128x64) #21

Open PaulZC opened 3 months ago

PaulZC commented 3 months ago

Another weird one...

If I add text top left (0,0) and then add a bitmap top right (getWidth - bitmap.width, 0), the bitmap causes column 0 to be corrupted, but only on the 1.3" (128x64) OLED. On the Micro (64x48), it's fine.

image

image

#include <SparkFun_Qwiic_OLED.h> //http://librarymanager/All#SparkFun_Qwiic_OLED

//QwiicMicroOLED myOLED;
Qwiic1in3OLED myOLED;

#include "res/qw_bmp_truck.h"

void setup()
{
    Wire.begin();

    myOLED.begin();

    myOLED.text(0, 0, "0"); // "0" top left

    myOLED.bitmap(myOLED.getWidth() - QW_BMP_TRUCK.width, 0, QW_BMP_TRUCK); // Icon top right

    myOLED.display();
}

void loop()
{
}
PaulZC commented 3 months ago

As you might expect, it is limited to the height of the bitmap:

image

    myOLED.text(0, 0, "0"); // "0" top left
    myOLED.text(0, 12, "0");