No announcement yet.

Image Display acting weird

  • Filter
  • Time
  • Show
Clear All
new posts

  • Image Display acting weird

    I am trying to use Arduino to display pictures on the OLED-32024-PMD3

    I've loaded pictures to the microSD and when I use the "ImageDemo1" in 4DGL is working fine.

    I have the "uOLED-320XX-PMD3-uSD-Serial_rev3.pmmc" installed to it now. And trying to control the screen via serial (with arduino). this is the code that sends the image data:

    Serial.print(0x40, BYTE);
    Serial.print(0x49, BYTE);
    Serial.print(0, BYTE);
    Serial.print(0, BYTE); // msb
    Serial.print(0, BYTE); // lsb
    Serial.print(240, BYTE);
    Serial.print(1, BYTE); // msb
    Serial.print(64, BYTE); // lsb
    Serial.print(16, BYTE); // 16 bit color mode (16 dec = 0x10)
    Serial.print(0, BYTE);
    Serial.print(0x10, BYTE);
    Serial.print(0, BYTE);
    and its displaying the image... but its moved to the right by about 5 pixels.

    here is the image location from the Graphic Composer file:

    Location = 0x200000(2097152)
    Width = 240 Height = 320 Bits = 16
    64, 73, 0, 0, 0, 240, 1, 64, 16, 0, 16, 0

    any ideas why this could happen?

  • #2

    ok... I figured out the problem. I chose "Image & Pixel Data (V2)" in the GC load options. This is needed when you use 4DGL to display the images. But not when you communicate via Serial. Then you have to use "Pixel Data Only (V1)"