From 0ed56c92c344f6de19b1a09a9ab56dc093393a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?BenjaminDanneg=C3=A5rd?= Date: Thu, 5 Dec 2024 09:10:24 +0100 Subject: [PATCH] Added delays to all sketches --- .../tutorials/02.gfx-guide/gfx-guide.md | 4 ++++ .../tutorials/03.lvgl-guide/content.md | 8 ++++++++ .../tutorials/04.basic-draw-and-image/content.md | 3 +++ .../tutorials/05.basic-touch/basic-touch.md | 2 ++ .../tutorials/06.image-orientation/content.md | 3 +++ .../tutorials/07.microphone-tutorial/content.md | 2 ++ .../tutorials/08.camera-tutorial/content.md | 1 + .../tutorials/10.square-line-tutorial/content.md | 3 +++ .../tutorials/12.emwin-guide/content.md | 7 +++++++ 9 files changed, 33 insertions(+) diff --git a/content/hardware/10.mega/shields/giga-display-shield/tutorials/02.gfx-guide/gfx-guide.md b/content/hardware/10.mega/shields/giga-display-shield/tutorials/02.gfx-guide/gfx-guide.md index f149a0530e..c429aa165f 100644 --- a/content/hardware/10.mega/shields/giga-display-shield/tutorials/02.gfx-guide/gfx-guide.md +++ b/content/hardware/10.mega/shields/giga-display-shield/tutorials/02.gfx-guide/gfx-guide.md @@ -43,6 +43,7 @@ To use the library, we simply need to create a display object, initialize the li GigaDisplay_GFX display; // create the object void setup() { + delay(3000); display.begin(); //init library display.setCursor(10,10); //x,y @@ -97,6 +98,7 @@ GigaDisplay_GFX display; // create the object #define BLACK 0x0000 void setup() { + delay(3000); display.begin(); display.fillScreen(BLACK); display.setCursor(10,10); //x,y @@ -131,6 +133,7 @@ GigaDisplay_GFX display; #define BLACK 0x0000 void setup() { + delay(3000); display.begin(); display.fillScreen(WHITE); display.drawTriangle(100, 200, 300, 400, 300, 600, BLACK); @@ -173,6 +176,7 @@ int counter; void setup() { // put your setup code here, to run once: Serial.begin(9600); + delay(3000); display.begin(); if (touchDetector.begin()) { diff --git a/content/hardware/10.mega/shields/giga-display-shield/tutorials/03.lvgl-guide/content.md b/content/hardware/10.mega/shields/giga-display-shield/tutorials/03.lvgl-guide/content.md index cd97524cc8..00bc5eb31a 100644 --- a/content/hardware/10.mega/shields/giga-display-shield/tutorials/03.lvgl-guide/content.md +++ b/content/hardware/10.mega/shields/giga-display-shield/tutorials/03.lvgl-guide/content.md @@ -64,6 +64,7 @@ In the `setup()`, we begin by initializing the display and the touch detector. ```arduino void setup(){ + delay(3000); Display.begin(); TouchDetector.begin(); } @@ -154,6 +155,7 @@ Arduino_H7_Video Display(800, 480, GigaDisplayShield); Arduino_GigaDisplayTouch TouchDetector; void setup() { + delay(3000); Display.begin(); TouchDetector.begin(); @@ -236,6 +238,7 @@ To make sure we see the image use the align function to make it centered. Then a Arduino_H7_Video Display(800, 480, GigaDisplayShield); void setup() { + delay(3000); Display.begin(); lv_obj_t * screen = lv_obj_create(lv_scr_act()); @@ -335,6 +338,7 @@ Arduino_H7_Video Display(800, 480, GigaDisplayShield); Arduino_GigaDisplayTouch TouchDetector; void setup() { + delay(3000); Display.begin(); TouchDetector.begin(); @@ -410,6 +414,7 @@ Arduino_H7_Video Display(800, 480, GigaDisplayShield); Arduino_GigaDisplayTouch TouchDetector; void setup() { + delay(3000); Display.begin(); TouchDetector.begin(); @@ -506,6 +511,7 @@ Arduino_H7_Video Display(800, 480, GigaDisplayShield); /* Arduino_H7_Vi Arduino_GigaDisplayTouch TouchDetector; void setup() { + delay(3000); Display.begin(); TouchDetector.begin(); @@ -634,6 +640,7 @@ static void set_slider_val(void * bar, int32_t val) { } void setup() { + delay(3000); Display.begin(); TouchDetector.begin(); @@ -752,6 +759,7 @@ static void btn_event_cb(lv_event_t * e) { } void setup() { + delay(3000); Display.begin(); TouchDetector.begin(); diff --git a/content/hardware/10.mega/shields/giga-display-shield/tutorials/04.basic-draw-and-image/content.md b/content/hardware/10.mega/shields/giga-display-shield/tutorials/04.basic-draw-and-image/content.md index 63939fd296..313397ac56 100644 --- a/content/hardware/10.mega/shields/giga-display-shield/tutorials/04.basic-draw-and-image/content.md +++ b/content/hardware/10.mega/shields/giga-display-shield/tutorials/04.basic-draw-and-image/content.md @@ -42,6 +42,7 @@ Let's first draw the background of the image. Start by initializing the display ```arduino void setup() { + delay(3000); Display.begin(); Display.beginDraw(); @@ -97,6 +98,7 @@ Arduino_H7_Video Display(800, 480, GigaDisplayShield); //Arduino_H7_Video Display(1024, 768, USBCVideo); void setup() { + delay(3000); Display.begin(); Display.beginDraw(); @@ -193,6 +195,7 @@ Arduino_H7_Video Display(800, 480, GigaDisplayShield); Image img_arduinologo(ENCODING_RGB16, (uint8_t *) texture_raw, 300, 300); void setup() { + delay(3000); Display.begin(); Display.beginDraw(); diff --git a/content/hardware/10.mega/shields/giga-display-shield/tutorials/05.basic-touch/basic-touch.md b/content/hardware/10.mega/shields/giga-display-shield/tutorials/05.basic-touch/basic-touch.md index 1b4a915ca8..dc9f8dbbbc 100644 --- a/content/hardware/10.mega/shields/giga-display-shield/tutorials/05.basic-touch/basic-touch.md +++ b/content/hardware/10.mega/shields/giga-display-shield/tutorials/05.basic-touch/basic-touch.md @@ -85,6 +85,7 @@ int lastTouch; int threshold = 250; //time in milliseconds void setup() { + delay(3000); Serial.begin(115200); while(!Serial) {} @@ -147,6 +148,7 @@ int threshold = 250; bool switch_1; void setup() { + delay(3000); // put your setup code here, to run once: Serial.begin(9600); display.begin(); diff --git a/content/hardware/10.mega/shields/giga-display-shield/tutorials/06.image-orientation/content.md b/content/hardware/10.mega/shields/giga-display-shield/tutorials/06.image-orientation/content.md index 285c227397..983eadd5ac 100644 --- a/content/hardware/10.mega/shields/giga-display-shield/tutorials/06.image-orientation/content.md +++ b/content/hardware/10.mega/shields/giga-display-shield/tutorials/06.image-orientation/content.md @@ -40,6 +40,7 @@ LV_IMG_DECLARE(img_arduinologo); lv_obj_t * img; void setup() { + delay(3000); Serial.begin(115200); Display.begin(); @@ -91,6 +92,7 @@ The easiest way to tell what values you are getting depending on the orientation BoschSensorClass imu(Wire1); void setup(){ + delay(3000); Serial.begin(115200); imu.begin(); } @@ -131,6 +133,7 @@ LV_IMG_DECLARE(img_arduinologo); lv_obj_t * img; void setup() { + delay(3000); Serial.begin(115200); Display.begin(); diff --git a/content/hardware/10.mega/shields/giga-display-shield/tutorials/07.microphone-tutorial/content.md b/content/hardware/10.mega/shields/giga-display-shield/tutorials/07.microphone-tutorial/content.md index ca1405a1f7..ecb70f93e4 100644 --- a/content/hardware/10.mega/shields/giga-display-shield/tutorials/07.microphone-tutorial/content.md +++ b/content/hardware/10.mega/shields/giga-display-shield/tutorials/07.microphone-tutorial/content.md @@ -209,6 +209,7 @@ short sampleBuffer[512]; volatile int samplesRead; void setup() { + delay(3000); Display.begin(); Display.beginDraw(); Display.background(255, 255, 255); @@ -316,6 +317,7 @@ lv_anim_t a; int micValue; void setup() { + delay(3000); Display.begin(); PDM.onReceive(onPDMdata); diff --git a/content/hardware/10.mega/shields/giga-display-shield/tutorials/08.camera-tutorial/content.md b/content/hardware/10.mega/shields/giga-display-shield/tutorials/08.camera-tutorial/content.md index b7516eda23..7f6db41628 100644 --- a/content/hardware/10.mega/shields/giga-display-shield/tutorials/08.camera-tutorial/content.md +++ b/content/hardware/10.mega/shields/giga-display-shield/tutorials/08.camera-tutorial/content.md @@ -113,6 +113,7 @@ void blinkLED(uint32_t count = 0xFFFFFFFF) uint32_t palette[256]; void setup() { + delay(3000); // Init the cam QVGA, 30FPS if (!cam.begin(CAMERA_R320x240, IMAGE_MODE, 30)) { blinkLED(); diff --git a/content/hardware/10.mega/shields/giga-display-shield/tutorials/10.square-line-tutorial/content.md b/content/hardware/10.mega/shields/giga-display-shield/tutorials/10.square-line-tutorial/content.md index c5811ffe56..c8ee756a4d 100644 --- a/content/hardware/10.mega/shields/giga-display-shield/tutorials/10.square-line-tutorial/content.md +++ b/content/hardware/10.mega/shields/giga-display-shield/tutorials/10.square-line-tutorial/content.md @@ -62,6 +62,7 @@ Arduino_H7_Video Display(800, 480, GigaDisplayShield); Arduino_GigaDisplayTouch Touch; void setup() { + delay(3000); Display.begin(); Touch.begin(); @@ -119,6 +120,7 @@ Then it is as simple as using the names of the widgets in a LVGL function. For e ```arduino void setup() { + delay(3000); Display.begin(); Touch.begin(); @@ -182,6 +184,7 @@ static void ButtonDec_evt_handler(lv_event_t * e) { } void setup() { + delay(3000); Display.begin(); Touch.begin(); diff --git a/content/hardware/10.mega/shields/giga-display-shield/tutorials/12.emwin-guide/content.md b/content/hardware/10.mega/shields/giga-display-shield/tutorials/12.emwin-guide/content.md index 93fcde9042..553d20385e 100644 --- a/content/hardware/10.mega/shields/giga-display-shield/tutorials/12.emwin-guide/content.md +++ b/content/hardware/10.mega/shields/giga-display-shield/tutorials/12.emwin-guide/content.md @@ -52,6 +52,7 @@ When creating elements, information about the screen and placement needs to be p ```arduino void setup() { + delay(3000); /* Init SEGGER emWin library. It also init display and touch controller */ GUI_Init(); @@ -73,6 +74,7 @@ Here is an example that sets the screen background color to green and prints the #include void setup() { + delay(3000); GUI_Init(); GUI_MULTIBUF_Begin(); GUI_SetBkColor(GUI_GREEN); @@ -261,6 +263,7 @@ static void _cbWin(WM_MESSAGE * pMsg) { } void setup() { + delay(3000); GUI_Init(); WM_MULTIBUF_Enable(1); WM_CreateWindowAsChild(0, 0, LCD_GetXSize(), LCD_GetYSize(), WM_HBKWIN, WM_CF_SHOW, _cbWin, 0); @@ -358,6 +361,7 @@ static void _cbChildWinCheck(WM_MESSAGE * pMsg) { } void setup() { + delay(3000); /* Init SEGGER emWin library. It also init display and touch controller */ GUI_Init(); @@ -469,6 +473,7 @@ static void _cbChildWinSlider(WM_MESSAGE * pMsg) { } void setup() { + delay(3000); /* Init SEGGER emWin library. It also init display and touch controller */ GUI_Init(); @@ -608,6 +613,7 @@ int progbarCnt = 0; unsigned long previousMillis = 0; void setup() { + delay(3000); /* Init SEGGER emWin library. It also init display and touch controller */ GUI_Init(); @@ -732,6 +738,7 @@ static void _cbChildWinBtn(WM_MESSAGE * pMsg) { } void setup() { + delay(3000); /* Init SEGGER emWin library. It also init display and touch controller */ GUI_Init();