Skip to content

Commit 94e71fb

Browse files
docs: add docs/README.md
1 parent 49d32b1 commit 94e71fb

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Arduino H7 Video Library
2+
3+
[![License](https://img.shields.io/badge/License-LGPLv3-blue.svg)]()
4+
5+
The Arduino H7 Video library is a C++ library designed to handle the video output of Arduino boards based on the STM32H7 microcontroller with DSI (Display Serial Interface) video interface. DSI stands for Display Serial Interface, which is a serial interface used to connect a display to the microcontroller.
6+
7+
This library is based on the graphics primitives of the [ArduinoGraphics](https://github.com/arduino-libraries/ArduinoGraphics) library and currently supports the Arduino Portenta H7 and Arduino Giga R1 WiFi boards. The library offers two modes of operation for the Portenta H7 board: you can connect the display to the video output via a USB Type-C connection or use the Giga Display Shield. For the Giga R1 board, only the Giga Display Shield is supported.
8+
9+
The library allows you to draw graphics elements on the screen using simple graphics primitives such as lines, circles, images, etc. Additionally, you can integrate third-party graphic libraries like [LVGL](https://lvgl.io/) and [emWin](https://www.segger.com/products/user-interface/emwin/) to achieve more complex GUI.
10+
11+
The library provides methods for initializing the video controller, clearing the screen, and drawing basic graphics elements.
12+
13+
## Features
14+
15+
- Handles video output of Arduino boards based on the STM32H7 microcontroller with DSI video interface
16+
- Allows drawing graphics elements using simple primitives like lines, circles, images, etc.
17+
- Integration of third-party graphic libraries like LVGL and emWin for more complex GUI
18+
19+
## Usage
20+
21+
To use this library, you must have a supported Arduino board and a display. Once you have connected the display to the board, you can include the display library in your Arduino sketch and use its functions to draw graphic elements on the screen.
22+
Here is a minimal example for the Arduino GIGA R1 WiFi with Giga Display Shield:
23+
24+
```cpp
25+
#include "Arduino_H7_Video.h"
26+
#include "ArduinoGraphics.h"
27+
28+
Arduino_H7_Video Display(800, 480, GigaDisplayShield);
29+
30+
void setup() {
31+
Display.begin();
32+
33+
// Draw a green rectangle that covers the entire display
34+
Display.beginDraw();
35+
Display.clear();
36+
Display.noStroke();
37+
Display.fill(0, 255, 0);
38+
Display.rect(0, 0, Display.width(), Display.height());
39+
Display.endDraw();
40+
}
41+
42+
void loop() { }
43+
```
44+
## Examples
45+
46+
- **[ArduinoLogo](../examples/ArduinoLogo):** This example demonstrates how to display an Arduino logo image on the screen.
47+
- **[ArduinoLogoDrawing](../examples/ArduinoLogoDrawing):** This example demonstrates how to draw an Arduino logo image using graphics primitives (line, circle, rect, etc.).
48+
- **[LVGLDemo](../examples/LVGLDemo):** This example demonstrates how to create a graphical user interface (GUI) using the LVGL library. It includes the [Arduino_GigaDisplayTouch](https://github.com/arduino-libraries/Arduino_GigaDisplayTouch/) library to handle touch events.
49+
50+
## API
51+
52+
The API documentation can be found [here](./api.md).
53+
54+
## License
55+
56+
This library is released under the [LGPLv3 license]().

0 commit comments

Comments
 (0)