Arduino GIGA Library errors

Hello, I want to learn to use the GIGA Shield Display and followed the guide of Arduino (https://docs.arduino.cc/tutorials/giga-display-shield/lvgl-guide/). So I installed the GIGA Board Package, the librarys lvgl.h and Arduino_GigaDisplayTouch.h and Arduino_H7_Video.h (I got from the GIGA Board Package. But if I want to upload them I get this error: C:\Users\keckm\OneDrive\Desktop\Abschlussprojekt\Programmversionen\NewTouchDisplay\NewTouchDisplay.ino:1:10: fatal error: Arduino_H7_Video.h: No such file or directory
#include "Arduino_H7_Video.h"
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: Arduino_H7_Video.h: No such file or directory

Can someone help? Thank you.

This is a personal experience reply and may not be totally valid ....

We had similar problems.
First of all we believe from a process of elimination that version 9.0.0 of the lvgl library does not work with the Giga. You have to remove 9.0.0 and load 8.3.11 or probably any 8.3.x versions. Once loaded 8.3.11 you have to go into C:\Documents\Arduino\libraries\lvgl folder and edit the lv_conf_template.h file as per the text instructions at the top of the file (just the "change the 0 to 1"). You then need to do a Save As and copy the edited file to the the C:\Documents\Arduino\libraries folder. It will probably be the only non folder file in that folder. While in the folder it's worth checking you have the Arduino GigaDisplay, Arduino GigaDisplayGFX and GigaDisplayTouch present. After we had spent hours trying to sort this out we finally had working demos of the Giga Display. Hopefully someone will fix 9.0.0 so it works like the earlier versions. Note that once you have reverted to 8.3.11 or earlier you will get constant messages to say there is a later version available. Ignore these messages and opt for manual update otherwise you will have to go through the above process again ...

Thanks. I did what you wrote and now this error pops up:
In file included from c:\Users\keckm\OneDrive\Dokumente\Arduino\libraries\Arduino_GigaDisplayTouch\src/Arduino_GigaDisplayTouch.h:34:0,
from C:\Users\keckm\OneDrive\Desktop\Abschlussprojekt\Programmversionen\NewTouchDisplay\NewTouchDisplay.ino:4:
c:\Users\keckm\OneDrive\Dokumente\Arduino\libraries\mbed/mbed.h:20:10: fatal error: platform/mbed_version.h: No such file or directory
#include "platform/mbed_version.h"
^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: exit status 1

In my libraries:
Arduino_GigaDisplay, Arduino_GigaDisplay_GFX, Arduino_GigaDisplayTouch, Arduino_H7_Video, ArduinoCore-mbed-4.1.1, ArduinoCore-mbed-main, ArduinoGraphics, lvgl, mbed, and the lv_conf_template (non folder)

Sorry Marke you are now into areas I have not experienced .... just to confirm that you have renamed lv_conf.h without the 'template' bit.
I have not used mbed but it looks like the mbed.h file cannot be found. I cannot recollect ever having to put a path in an include statement. I suggest you search around in the libraries folder for mbed.h and see what the path is to it and adjust accordingly,

Hey. Thank you for your help.
For your information: Its working now. I unistalled the software and installed it new with all the librars and now its working. I dont know why but it works now.

1 Like

Good news Marke, sounds like a Arduino at its best ....
Are you still running the earlier version of lvgl ?

Alan

Yes the 8.3.11

Hi Marke
We have been struggling to get the OC7675 camera to display on the Giga display. There are various demo sketches floating around for this but the only one we have now found to work is the Examples\Camera\GigaCameraDisplay but you must change the camera type in the first #Define statement. This particular version has some added IF statements that make all the difference between abject frustration and a smiley face.

Not sure if it helps or not. But here is one I have been hacking on, that appears to work using the Adafruit GFX library:

REDIRECT_STDOUT_TO(Serial)
#include "Arduino_GigaDisplay_GFX.h"
#define GC9A01A_CYAN 0x07FF
#define GC9A01A_RED 0xf800
#define GC9A01A_BLUE 0x001F
#define GC9A01A_GREEN 0x07E0
#define GC9A01A_MAGENTA 0xF81F
#define GC9A01A_WHITE 0xffff
#define GC9A01A_BLACK 0x0000
#define GC9A01A_YELLOW 0xFFE0
#define ALIGN_PTR(p,a)   ((p & (a-1)) ?(((uintptr_t)p + a) & ~(uintptr_t)(a-1)) : p)


#include "arducam_dvp.h"
//#include "SDRAM.h"

// This example only works with Greyscale cameras (due to the palette + resize&rotate algo)
//#define ARDUCAM_CAMERA_HM01B0

#include "OV7670/ov767x.h"
//OV7670 ov767x;
OV7675 ov767x;
Camera cam(ov767x);
#define IMAGE_MODE CAMERA_RGB565

// The buffer used to capture the frame
FrameBuffer fb;

// The buffer used to rotate and resize the frame
GigaDisplay_GFX display;
uint16_t g_camera_width;
uint16_t g_camera_height;

void blinkLED(uint32_t count = 0xFFFFFFFF) {
  pinMode(LED_BUILTIN, OUTPUT);
  while (count--) {
    digitalWrite(LED_BUILTIN, LOW);   // turn the LED on (HIGH is the voltage level)
    delay(50);                        // wait for a second
    digitalWrite(LED_BUILTIN, HIGH);  // turn the LED off by making the voltage LOW
    delay(50);                        // wait for a second
  }
}

void setup() {
  while (!Serial && millis() < 5000) {}
  Serial.begin(115200);

  // Init the cam QVGA, 30FPS
  SDRAM.begin();
  Serial.println("Before camera start"); Serial.flush();
  if (!cam.begin(CAMERA_R640x480 /*CAMERA_R320x240 */, IMAGE_MODE, 15)) {
    blinkLED();
  }

  Serial.println("Before setBuffer"); Serial.flush();

  uint8_t *fb_mem = (uint8_t *)SDRAM.malloc(640 * 480 * 2 + 32);
  fb.setBuffer((uint8_t *)ALIGN_PTR((uintptr_t)fb_mem, 32));
  printf("Frame buffer: %p\n", fb.getBuffer());

  // clear the display (gives a nice black background)
  Serial.println("Before setRotation"); Serial.flush();
  display.begin();
  display.setRotation(1);
  Serial.println("Before fillscreen"); Serial.flush();
  display.fillScreen(GC9A01A_BLUE);

  g_camera_width = 640; //320; //cam.getResolutionWidth();
  g_camera_height = 480; //240; //cam.getResolutionHeight();
  Serial.println("end setup"); Serial.flush();
}

#define HTONS(x) (((x >> 8) & 0x00FF) | ((x << 8) & 0xFF00))

void loop() {

  // Grab frame and write to another framebuffer
  if (cam.grabFrame(fb, 3000) == 0) {

    // We need to swap bytes.
    uint16_t *pixels = (uint16_t *)fb.getBuffer();
    for (int i = 0; i < g_camera_width * g_camera_height; i++) pixels[i] = HTONS(pixels[i]);
    display.drawRGBBitmap((display.width() - g_camera_width) / 2, (display.height() - g_camera_height) / 2, pixels, g_camera_width, g_camera_height);
  } else {
    blinkLED(20);
  }
}

Currently have it configured for 640 by 480 mode...

1 Like

Good morning Kurt and thank you taking time to send me the sketch. It works and works very well with good quality images and no distortions on the image.
What confuses me is that yesterday I ran the GigaCameraDisplay sketch a number of times and it loaded and ran fine. This morning I have had no success with it, just a black screen. What can possibly change overnight with no electronic influence ???
On this basis I will keep trying your sketch at different times and see if it does the same thing (good one day and not the next). More and more it feels like there is something fundamentally unstable with the Giga board.

Hi Kurt, I sent your sketch to a colleague who is also having issues. He said the sketch loaded very quickly but did not work leaving 'Before Camera Start' in the serial monitor.

Sorry no idea...

I would double check that all of the connections are tight....

In cases like this I will often add a few things to startup to help debug...
I already have:

  Serial.println("Before fillscreen"); Serial.flush();
  display.fillScreen(GC9A01A_BLUE);

I often have something like:

  Serial.println("Before fillscreen"); Serial.flush();
  display.fillScreen(GC9A01A_RED);
  delay(500);
  display.fillScreen(GC9A01A_GREEN);
  delay(500);
  display.fillScreen(GC9A01A_BLUE);
  delay(500);

To see if the display is working or not. (Or whichever TFT display I am testing)

Check camera plugged in? Where the camera is on the front of the display.
They have the OV7675 and not the 7670. If 7670 need to edit sketch to match.
And if generic 7670 they have 2x9 pins not 2x10, make sure the camera is plugged in where the 3.3v/gnd pins are matching...

EDIT: In both cases, I would double check you are up to date on board/library installs

Thank you for reporting this! On the compatibility with LVGL 9, there is an issue created to better support the new version Initial: support LVGL9 by facchinm · Pull Request #847 · arduino/ArduinoCore-mbed · GitHub and work is being done to fix it.
Meanwhile, the solution is as referred to a downgrade to LVGL v8.3.x