|
| 1 | +--- |
| 2 | +title: 'Getting Started with the GIGA Display Shield' |
| 3 | +description: 'Learn how to set up and use the GIGA Display Shield and get an overview of its features.' |
| 4 | +author: 'Karl Söderby' |
| 5 | +hardware: |
| 6 | + - hardware/08.mega/boards/giga-r1-wifi |
| 7 | + - hardware/08.mega/shields/giga-display-shield |
| 8 | +tags: [Display, Touch, LVGL, GIGA, IMU, GFX] |
| 9 | +--- |
| 10 | + |
| 11 | +The [GIGA Display Shield](/hardware/giga-display-shield) is an accessory shield designed for the [GIGA R1 WiFi](/hardware/giga-r1-wifi) board. With it, you can render fast & sophisticated user interfaces on a **800x480** display with **touch support**. |
| 12 | + |
| 13 | +In this guide you will learn how to set your board up with the GIGA R1 WiFi board & become familiar with the available libraries to control it. |
| 14 | + |
| 15 | +## Hardware & Software Needed |
| 16 | + |
| 17 | +- [GIGA R1 WiFi](https://store.arduino.cc/products/giga-r1-wifi). |
| 18 | +- [GIGA Display Shield](https://store.arduino.cc/products/giga-display-shield) |
| 19 | +- [Arduino IDE](https://www.arduino.cc/en/software) |
| 20 | + |
| 21 | +## Overview |
| 22 | + |
| 23 | +To use the GIGA Display Shield, there are currently three supported alternatives to draw on the display. |
| 24 | + |
| 25 | +### Option 1: GFX Library |
| 26 | + |
| 27 | +The [Arduino_GigaDisplay_GFX](https://github.com/arduino/Arduino_GigaDisplay_GFX) library is a layer library for the [Adafruit_GFX](https://github.com/adafruit/Adafruit-GFX-Library) graphic core library. This library makes it easy to draw geometrical shapes, printing values, drawing pixels and more. |
| 28 | + |
| 29 | +To get started with the GFX library, visit the [GIGA Display Shield GFX Guide](/tutorials/giga-display-shield/gfx-guide). |
| 30 | + |
| 31 | +### Option 2: LVGL |
| 32 | + |
| 33 | +The LVGL framework supports building more advanced UIs with dropdown menus, interactive buttons, scroll functionality using a grid system. |
| 34 | + |
| 35 | +To get started, visit the [GIGA Display LVGL Guide](/tutorials/giga-display-shield/lvgl-guide) |
| 36 | + |
| 37 | +### Option 3: ArduinoGraphics |
| 38 | + |
| 39 | +[ArduinoGraphics](https://www.arduino.cc/reference/en/libraries/arduinographics/) is a simple library for more primitive drawings with a similar API to the GFX library. |
| 40 | + |
| 41 | +To get started, visit the [GIGA Display Shield Draw Images Guide](/tutorials/giga-display-shield/basic-draw-and-image). |
| 42 | + |
| 43 | +## Core & Libraries |
| 44 | + |
| 45 | +The GIGA Display Shield requires you to install the core for GIGA boards, along with some additional software libraries. |
| 46 | + |
| 47 | +The libraries can be installed via the Arduino IDE's library manager, where you will also discover examples. |
| 48 | + |
| 49 | +### GIGA Core |
| 50 | + |
| 51 | +To use the shield you will need a [GIGA R1 WiFi](https://store.arduino.cc/products/giga-r1-wifi) board. You also need to install the **GIGA core**, which can be done directly in the Arduino IDE, under "Board Manager". The source code for this core can be found in [this GitHub repository](https://github.com/arduino/ArduinoCore-mbed). |
| 52 | + |
| 53 | +***For more details, see [Getting Started with GIGA R1 WiFi](/tutorials/giga-r1-wifi/giga-getting-started).*** |
| 54 | + |
| 55 | +### Arduino_H7_Video |
| 56 | + |
| 57 | +The [Arduino_H7_Video](https://github.com/arduino/ArduinoCore-mbed/tree/main/libraries/Arduino_H7_Video) manages the video output and integrates third party frameworks such as [LVGL](https://lvgl.io/). This library is used to configure and initialize the display and to perform basic draw functions. |
| 58 | + |
| 59 | +***This library is included with the GIGA core, and does not need to be installed. The documentation for this library is available [here](https://github.com/arduino/ArduinoCore-mbed/tree/main/libraries/Arduino_H7_Video/docs).*** |
| 60 | + |
| 61 | +### ArduinoGraphics |
| 62 | + |
| 63 | +The [ArduinoGraphics](https://www.arduino.cc/reference/en/libraries/arduinographics/) is required for drawing operations on the screen. |
| 64 | + |
| 65 | +***For source code and issues with the ArduinoGraphics library, please see the [GitHub repository](https://github.com/arduino-libraries/ArduinoGraphics).*** |
| 66 | + |
| 67 | +### Arduino_GigaDisplayTouch |
| 68 | + |
| 69 | +The [Arduino_GigaDisplayTouch](https://www.arduino.cc/reference/en/libraries/arduino_gigadisplaytouch/) is required for reading touch points on the screen, and is needed when using the LVGL's framework. |
| 70 | + |
| 71 | +***For source code and issues with the Arduino_GigaDisplayTouch library, please see the [GitHub repository](https://github.com/arduino-libraries/Arduino_GigaDisplayTouch).*** |
| 72 | + |
| 73 | +### Arduino_GigaDisplay_GFX |
| 74 | + |
| 75 | +The [Arduino_GigaDisplay_GFX](https://github.com/arduino-libraries/Arduino_GigaDisplay_GFX) library is a layer library for the [Adafruit_GFX](https://github.com/adafruit/Adafruit-GFX-Library) graphics core library. |
| 76 | + |
| 77 | +This library is great for drawing geometrical shapes, printing text & values, drawing pixels and so on. It is recommended for beginners. |
| 78 | + |
| 79 | +***Learn more about this library in the [GIGA Display Shield GFX Guide](/tutorials/giga-display-shield/gfx-guide).*** |
| 80 | + |
| 81 | +### Arduino_GigaDisplay |
| 82 | + |
| 83 | +The [Arduino_GigaDisplay](https://github.com/arduino-libraries/Arduino_GigaDisplay) provides a large set of examples that can be used with the shield, many of which are included in the guides found in the documentation. |
| 84 | + |
| 85 | +This library is also required to use the built-in RGB, which you can read more about in the [RGB](#rgb) section. |
| 86 | + |
| 87 | +***This library lists out all recommended libraries as dependencies. Installing it through the IDE will also prompt you to install the libraries listed above.*** |
| 88 | + |
| 89 | +### Arduino_BMI270_BMM150 (IMU) |
| 90 | + |
| 91 | +To access the onboard IMU, use the [Arduino_BMI270_BMM150](https://github.com/arduino-libraries/Arduino_BMI270_BMM150) library. |
| 92 | + |
| 93 | +You can read more about its methods in the [library documentation](https://www.arduino.cc/reference/en/libraries/arduino_bmi270_bmm150/). |
| 94 | + |
| 95 | +More information available in the [IMU section](#imu) in this document. |
| 96 | + |
| 97 | +## Hardware Setup |
| 98 | + |
| 99 | +To use the GIGA Display Shield, mount it on the **bottom** side of the GIGA R1 WiFi board. The GIGA R1 WiFi board will be flipped upside down when the display is used. |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | +This makes it possible to freely use the GIGA R1 WiFi's pins while the display shield is connected. |
| 104 | + |
| 105 | +## Camera Connector |
| 106 | + |
| 107 | +Located on the top side of the shield is a 20 pin camera connector, which is Arducam® compatible and supports a wide range of cameras. The connector is connected to the [GIGA R1 WiFi's camera connector](/tutorials/giga-r1-wifi/giga-camera#camera-connector), and is compatible with a wide range of cameras ([see Arducam cameras](https://www.arducam.com/camera-for-arduino-giga/)). |
| 108 | + |
| 109 | +The connector is located just above the display, which makes it possible to see camera's feed directly on the display! Read more about this in the [GIGA Display Camera Connector Guide](/tutorials/giga-display-shield/camera-tutorial), complete with an example. |
| 110 | + |
| 111 | +## IMU |
| 112 | + |
| 113 | +This shield has a built-in IMU module, the **BMI270**. This sensor can be used for a number of purposes, for example to automatically orientate an object on the screen, see the following tutorial: |
| 114 | + |
| 115 | +- [Giga Display Shield Automatic Orientation](/tutorials/giga-display-shield/image-orientation) |
| 116 | + |
| 117 | +To access **BMI270**, use the [BMI270-250](https://www.arduino.cc/reference/en/libraries/arduino_bmi270_bmm150/) library. Please note that the sensor is not connected to the main I2C bus, so you will need to initialize the sensor on another bus. To do so, simply add the line below to the top of your sketch: |
| 118 | + |
| 119 | +```arduino |
| 120 | +BoschSensorClass imu(Wire1); |
| 121 | +``` |
| 122 | + |
| 123 | +Note that the examples use the default `IMU` (uppercase) class, which you will need to replace. Example: |
| 124 | + |
| 125 | +``` |
| 126 | +IMU.begin() //for other boards |
| 127 | +imu.begin() //for GIGA Display Shield |
| 128 | +``` |
| 129 | + |
| 130 | +## Microphone |
| 131 | + |
| 132 | +This shield has an embedded omnidirectional microphone, **MP34DT06JTR**, which can be used together with the [PDM](https://docs.arduino.cc/learn/built-in-libraries/pdm) library. This library is shipped with the GIGA core, so there's no need to manually install it. |
| 133 | + |
| 134 | +Below is a minimal sketch that will print out the samples in the serial plotter (See [Using the Serial Plotter Tool](/software/ide-v2/tutorials/ide-v2-serial-plotter) for more information). |
| 135 | + |
| 136 | +<CodeBlock url="https://github.com/arduino/ArduinoCore-mbed/blob/main/libraries/PDM/examples/PDMSerialPlotter/PDMSerialPlotter.ino" className="arduino"/> |
| 137 | + |
| 138 | +To get started with the microphone, visit the [GIGA Display Shield Microphone Guide](/tutorials/giga-display-shield/microphone-tutorial). |
| 139 | + |
| 140 | +## RGB |
| 141 | + |
| 142 | +This shield has a built in RGB pixel that is controlled via I2C. To use this, install the [Arduino_GigaDisplay](https://github.com/arduino-libraries/Arduino_GigaDisplay) library. The following sketch is a minimal example that will blink the blue pixel every second. |
| 143 | + |
| 144 | +```arduino |
| 145 | +#include <Arduino_GigaDisplay.h> |
| 146 | +
|
| 147 | +GigaDisplayRGB rgb; //create rgb object |
| 148 | +
|
| 149 | +void setup() { |
| 150 | + rgb.begin(); //init the library |
| 151 | +} |
| 152 | +
|
| 153 | +void loop() { |
| 154 | + rgb.on(0, 0, 255); //turn on blue pixel |
| 155 | + delay(1000); |
| 156 | + rgb.off(); //turn off all pixels |
| 157 | + delay(1000); |
| 158 | +} |
| 159 | +``` |
0 commit comments